I would like to compute texture statistics on a gray value image, but separately for image regions that are given in a separate label image. Basically the same as itk::LabelStatisticsImageFilter<RawImage, LabelImage> does, but for texture.
Does that exist? Or is there a typical workflow how to do that in ITK? I could not find a ready-made module that would take a LabelImage. The itk::Statistics::ScalarImageToTextureFeaturesFilter seems useful but takes only a mask, not a label image. Are there other ways to achieve that, without having to iterate over all the labels individually?
Thanks @dzenanz for the quick response! Iāll implement it with iteration over the objects then.
I guess its not too likely that someone would implement this with a single pass over the image? I understand that this comes with the problem that it may consume excessive memory for the many 2D histogramsā¦
My use case is that I have hundreds if not thousands of small segmented objects in an image. To create the textures I currently iterate the image thousands of times, every time creating a single texture. The simple iteration over the image adds up to a lot of runtime.
So I do not mean that ITK should create the texture measurements in parallel like in āmulti-threaded parallelā. I mean it would already help a lot if a single pass over the image would be sufficient, even if internally ITK processes object after object sequentially.
Would something like that be possible, for example by extracting a temporary internal representation of the object intensities for each object?