Hello, everyone! I’m trying to make use of the Stochastic Fractal Dimension Image Filter, but I’ve been unable to get any results in 2D or 3D images. All the outputs are blank (actually, black).
Could anyone please point out where I’m getting the filter usage wrong?
Attached is the image I’m using as input and a .zip of the code itself with a CMakeLists file ready to run it.
Thanks for your reply! Yes, when dealing with 3D images I use float as the output pixel type. However, since my 2D images are in .png format, I must use either unsigned char or unsigned int.
I am just writing up a wrapper for this class for SimpleITK. The results with integer pixel type for output were very poor, mostly 0,1,2 for the “cthead1.png” test image. The output of this filter should be a real type. If you have a png image of {0,1,2} and it’s loaded into a standard view you will see just a black image. You should be using a view that can support window and leveling, and file format that write float/double types. ImageJ comes to mind for basic 2D images, while 3D Slicer or medical images.
If you must write as uchar , you can use a filter to change the intensity of the image such as RescaleIntensityImageFilter.
Of course, I should be using the rescale intensity filter! I just plugged it into my pipeline and now everything works fine. Thank you for your support, Bradley!
@pfreire There is no need to change the original post’s title to include the word [Solved]. There is an option for that in discourse and we have intentionally not enabled it. It deters from further discussion.
Getting back to this topic in order to understand how the mask usage works in this particular filter. It has the option to provide a mask to constrain the ROI and thus decrease computation time. However, I’ve given a binary mask (unsigned char) as input but the output still encompasses the whole image. No decrease in computation time is observed. I’ve used binary masks with 0 as background and 1 as foreground and also 0 as background and 255 (unsigned char max) as foreground, but to no avail. Could someone please tell me what to do in this case? Thank you very much!