Closed hanslovsky closed 7 years ago
Hello @hanslovsky !
If you use the that WekaSegmentation
constructor, you need to set the training image with the method setTrainingImage()
as described in the [API](http://javadoc.imagej.net/Fiji/trainableSegmentation/WekaSegmentation.html#WekaSegmentation()). I will check if I can implement an alternative...
As @iarganda stated on gitter, no features will be computed before call to applyClassifier
.
This resolves this issue for me because I can just use the WekaSegmentation( ImagePlus )
constructor without any overhead.
Maybe just renaming the argument of WekaSegmentation( ImagePlus )
to just image
would be a good idea.
Thanks @hanslovsky ! I will implement an alternative to work with WekaSegmentation
without using a training image as you were trying to do.
I would like to apply a trained 2D model to a 2D image but I fail at loading the classifier already. Minimum working failing example:
Output:
featureStackArray
is null at that point.For now I can use this work-around (thanks to @stelfrich ) but I am worried that it would do unnecessary feature computations and it is more confusing to call the constructor with an
ImagePlus
:See also this conversation on gitter: https://gitter.im/fiji/fiji?at=58ac564bde50490822f78ed8