[Insight-developers] Looking at IsolatedWatershedImageFilter test… oddness

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Dec 20 15:09:55 EST 2011


Hello,

I am looking at the IsolatedWatershedImageFilter to wrap it for simple ITK and I am noticing some oddness.

Firstly, I don't know how the test is passing... The base line image appears to be a segmentation for the white matter of a brain while the input image is "cthead1.png". The feature in the baseline just are not there. I am perplexed as to how the test is passing.

itk_add_test(NAME itkIsolatedWatershedImageFilterTest
      COMMAND ITKWatershedsTestDriver
    --compare DATA{${ITK_DATA_ROOT}/Baseline/Algorithms/IsolatedWatershedImageFilterTest.png}
              ${ITK_TEST_OUTPUT_DIR}/IsolatedWatershedImageFilterTest.png
    itkIsolatedWatershedImageFilterTest DATA{${ITK_DATA_ROOT}/Input/cthead1.png} ${ITK_TEST_OUTPUT_DIR}/IsolatedWatershedImageFilterTest.png 113 84 120 99)

Secondly,  This filter uses a mini-pipeline of the with the following 2 filters:

  typedef WatershedImageFilter< InputImageType >                          WatershedType;
  typedef GradientMagnitudeImageFilter< InputImageType, OutputImageType > GradientMagnitudeType;

Where the input and output image types are template parameters from IsolatedWatershed filter. As the output of the grad filter goes into the watershed filter, this means that currently this filter can only be instantiated with TInput=TOutput.

I am thinking that that output type for The gradient filter should be an image of RealType to prevent overflow.

This is just a filter I am questioning the how many people have really used this filter and how to best deal with it to wrap it for SimpleITK.

Thanks for your suggestions,
Brad


More information about the Insight-developers mailing list