<DIV>Hello Luis,</DIV>
<DIV>Thank you very much for your valuable suggestions and inputs.</DIV>
<DIV>Neha<BR><BR><B><I>Luis Ibanez &lt;luis.ibanez@kitware.com&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR><BR>Hi Neha,<BR><BR><BR>For the same image: tumor57.png you can also use<BR>the ShapeDetectionLevelSetImageFiltere.<BR><BR>Note however that this filter defines the borders<BR>of structures based on gradients. Therefore the<BR>segmentation will find the internal border of the<BR>tumor, if you initialize the level set in the center.<BR><BR>A segmentation of the tumor in tumor57.png is attached.<BR><BR>It was generated with the example in<BR><BR>Insight/Examples/Segmentation/<BR>ShapeDetectionLevelSetFilter<BR><BR>without any modification in the source code, and just<BR>by using the following command line arguments<BR><BR>ShapeDetectionLevelSetFilter<BR>tumor57.png tumor57Segmented.png 30 63 5 1 -1 5 1 20<BR><BR><BR>Where<BR><BR>the number 30 63 are the approximate center of the tumor<BR>the number 5 is the radius to be used for an initial level set<BR>the number 1 is the sigma for
 the gaussian used in the speed<BR>image computation<BR>the numbers -1 5 are alpha and beta for the Sigmoid filter used<BR>in the speed image computation<BR>the numbers 1 20 are the curvature and propagation scaling.<BR><BR><BR>For a detailed description of this example, please look at the<BR>ITK Software Guide<BR><BR>http://www.itk.org/ItkSoftwareGuide.pdf<BR><BR>in the Level Set Segmentation Chapter.<BR><BR><BR><BR><BR>On way of getting the external border of the tumor is to dilate<BR>this segmentation, and use it as the inital level set for another<BR>run of the ShapeDetection filter. In this way the level set will<BR>walk up to the next edge.<BR><BR><BR><BR>Regards,<BR><BR><BR><BR>Luis<BR><BR><BR>-----------------<BR>neha k wrote:<BR><BR>&gt; Hello Luis,<BR>&gt; I did not make any changes to code. But I was trying to output image <BR>&gt; mhd &amp; raw format. It is working fine though. Thanks a lot for your input.<BR>&gt; Now, I tried to use shapeDetectionLevelSet Example to
 work with Brain <BR>&gt; tumour Raw Image (Attached - tumour57.raw), I am not getting any desired <BR>&gt; result. For such tumor images, do you have any suggestions for what <BR>&gt; Level Set Filter to choose? Smoothing (Curvature Anisotropic diffusion <BR>&gt; Filter) did not seem to help at all. Moreoever, I am not sure why <BR>&gt; result of above smoothing produces output with black border. I have <BR>&gt; attached original Image (tumour57.raw), output of smoothing ( <BR>&gt; tumour57_CurvAnisoSmooth.mhd.raw ) and result of giving this smoothed <BR>&gt; image to Shape Detection Level Set filter ( <BR>&gt; tumour57_CurvAnisoSmooth_LevelSet.raw ).<BR>&gt; Any input on this is appreciated.<BR>&gt; Thanks,<BR>&gt; Neha<BR>&gt; <BR>&gt; */Luis Ibanez <LUIS.IBANEZ@KITWARE.COM>/* wrote:<BR>&gt; <BR>&gt; <BR>&gt; Hi Neah,<BR>&gt; <BR>&gt; Thanks a lot for posting such a detailed message.<BR>&gt; <BR>&gt; <BR>&gt; We attempted to reproduce the result that you reported,<BR>&gt; but the
 program worked fine for us.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Here are the command line parameters that we used,<BR>&gt; and the output from the program:<BR>&gt; <BR>&gt; <BR>&gt; A) Command line:<BR>&gt; <BR>&gt; ShapeDetectionLevelSetFilter BrainT1Slice.png T1.png<BR>&gt; 81 113 5 1 -0.5 3 0.05 1<BR>&gt; <BR>&gt; Output:<BR>&gt; <BR>&gt; Max. no. iterations: 800<BR>&gt; Max. RMS error: 0.02<BR>&gt; <BR>&gt; No. elpased iterations: 108<BR>&gt; RMS change: 0.0199696<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; B) Command line:<BR>&gt; <BR>&gt; ShapeDetectionLevelSetFilter BrainProtonDensitySlice.png PD.png<BR>&gt; 81 113 5 1 -0.5 3 0.05 1<BR>&gt; <BR>&gt; Output:<BR>&gt; <BR>&gt; Max. no. iterations: 800<BR>&gt; Max. RMS error: 0.02<BR>&gt; <BR>&gt; No. elpased iterations: 125<BR>&gt; RMS change: 0.0189581<BR>&gt; <BR>&gt; <BR>&gt; The output images (T1.png and PD.png) are attached.<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Did you modified th! e code of this Example<BR>&gt; in any way
 before running it ?<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Please let us know,<BR>&gt; <BR>&gt; <BR>&gt; Thanks<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; Luis<BR>&gt; <BR>&gt; <BR>&gt; --------------------------<BR>&gt; neha k wrote:<BR>&gt; <BR>&gt; &gt; Hello,<BR>&gt; &gt;<BR>&gt; &gt; I am trying to check with<BR>&gt; ITK1.8\Example\ShapeDetectionLevelSetFilter,<BR>&gt; &gt; and do not get desired output. I tried this compiled example with<BR>&gt; &gt; following input images and parameters -<BR>&gt; &gt;<BR>&gt; &gt; *1. BrainT1Slice.png(input image from \ITK\Examples\Data) - with *<BR>&gt; &gt;<BR>&gt; &gt; Seed Point - (81 113) , Distance - 5.0,<BR>&gt; &gt;<BR>&gt; &gt; Sigma SigmoidAlpha SigmoidBeta are -- 1 .0 -0.5 3.0<BR>&gt; &gt;<BR>&gt; &gt; Curv. Scaling -- 0.05 Propogation Scaling -- 1<BR>&gt; &gt;<BR>&gt; &gt; *Output File Name Attached - ShapeDetectionLevelSetFilterOutput4.png*<BR>&gt; &gt;<BR>&gt; &gt; *2. BrainProtonDensitySlice.png with Seed Point - (81,114) and<BR>&gt; rest
 of<BR>&gt; &gt; the parameters *have same values as above.<BR>&gt; &gt;<BR>&gt; &gt; Problem - Result of SigmoidFilter is Blank Image while output ! of<BR>&gt; &gt; ShapeDetectionLevelSet Filter for both images is something weird.<BR>&gt; &gt; (attached files)<BR>&gt; &gt;<BR>&gt; &gt; Any input on this appreciated.<BR>&gt; &gt;<BR>&gt; &gt; Thanks,<BR>&gt; &gt;<BR>&gt; &gt; Neha<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; <BR>&gt; <BR>&gt; &gt; ATTACHMENT part 2 image/png name=T1.png<BR>&gt; <BR>&gt; <BR>&gt; &gt; ATTACHMENT part 3 image/png name=PD.png<BR>&gt; <BR>&gt; ------------------------------------------------------------------------<BR>&gt; Do you Yahoo!?<BR>&gt; The all-new My Yahoo! <HTTP: my.yahoo.com>– Get yours free!<BR><BR><BR><BR>&gt; ATTACHMENT part 2 image/png name=tumor57SegmentedShapeDetectionLevelSet.png<BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br> 
<a href="http://us.rd.yahoo.com/mail_us/taglines/virus/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - Helps protect you from nasty viruses.