[Insight-users] Error with Watershed Segmentation Example -- Problem Solved.

neha k itkneha1 at yahoo.com
Thu Nov 11 19:21:18 EST 2004


Hello Luis,

The problem is solved. The problem was due to the way I was reading 
the input image.  Now instead of directly using watershedsegmentation1.cxx, I have written another program which reads raw images with MetaImage format,  I read them as float and then pass the output of reader to smoothing filter, then to Gradient Magnitude filter, then  to Watershed, and then write the result of watershed as RGB image using 
ScalarToRGBPixelFunctor and UnaryFunctorImageFilter.
 
Thanks for all your help,
Neha

Luis Ibanez <luis.ibanez at kitware.com> wrote:

Hi Neha,


Thanks for posting your images and the description of your problem.

We tried passing your image as input to the Watershed example, but it
happens that your tumor58.raw image has a *constant zero value* in all
pixels.


Please verify the source where you obtained this image.


---

Regarding the error message that you got,
it is clearly indicating that your threshold value is *too high*:

>
> itk::watershed::SegmentTreeGenerator::MergeSegments::
> An unexpected and fatal error has occurred. This is probably the
> result of overthresholding of the input image.
>

You are setting a threshold value that is HIGHER than that water level,
this is incorrect. The threshold value should be lower than the water
level.

Please try values like


Threshold = 0.01
Water level = 0.05 to 0.2


Please read the description of this example in the
ITK Software Guide

http://www.itk.org/ItkSoftwareGuide.pdf

Section 9.2, pdf-page 356.



Regards,


Luis


=================

neha k wrote:

> Hello Luis,
> 
> Can I use watershed example (from ITK1.8\Examples) with Brain MRIs (Raw 
> format)? When I try to use Watershed example on Brain MRI with tumour, 
> with following parameters range- 
> 
> Conductance Term -> 1-4, No. of Iterations - 3 - 10, Threshold (%) - 0.0 
> - 0.3, Level Of Watershed 0.01 - 0.05,
> Principle Componenet Analysys - On. I am not sure if I need to use 
> Principle Componenet Analysys.
> 
> I get following error: ------>
> 
> itk::ExceptionObject (0104F288)
> Location: "Unknown"
> File: 
> C:\ITK_1.8\InsightToolkit-1.8.0\Code\Algorithms\itkWatershedSegmentTreeGen
> erator.txx
> Line: 436
> Description: itk::ERROR: 
> itk::watershed::SegmentTreeGenerator::MergeSegments:: A
> n unexpected and fatal error has occurred. This is probably the result 
> of overth
> resholding of the input image.
> 
> Do you have any suggestions? I have attached the image. 
> 
> Thanks.
> 





			
---------------------------------
Do you Yahoo!?
 Check out the new Yahoo! Front Page. www.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20041111/445576e4/attachment.html


More information about the Insight-users mailing list