<DIV>Hello Luis,</DIV>
<DIV>Thanks for the reply.&nbsp; I have chanegd interataions to 100.&nbsp; But with same png image, I get different result (I have used ctr. as(79,93).&nbsp; The center that you have specified (30,63) seems to be out of&nbsp;brain area.&nbsp; Also, if i use original raw image, output is blank.&nbsp; I am not sure what is going wrong.&nbsp;&nbsp; (I&nbsp;saved original raw image as .png image by making it 8-bits per channel from 16-bit per channel in photoshop , and then sent to you)</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>Hi Neha,<BR><BR>Thanks for posting your image.<BR><BR>The ThresholdSegmentationLevelSet worked fine in this image,<BR><BR>I used the example code in:<BR><BR><BR>Insight/Examples/Segmentation/<BR>ThresholdSegmentationLevelSetImageFilter.cxx<BR><BR><BR>Just replaced the maximum number of iteration in line 200.<BR><BR>The current value is 1200 iteration,<BR>you must use here 100 iterations.<BR><BR><BR>Then in the command line use<BR><BR><BR>ThresholdSegmentationLevelSetImageFilter<BR>tumor57.png segmented.png 30 63 5 70 207<BR><BR><BR>(in a single command line)<BR><BR>The numbers: 30 63 are respectively the X,Y approximate coordinates<BR>of the tumor center.<BR><BR>The number: 5 is a radius to be used for creating a initial level set<BR>as a circle of radius 5 pixels centered at (30,63).<BR><BR>The numbers: 70 and 207 and the lower and upper thresholds that define<BR>a border for the
 tumor.<BR><BR><BR><BR>In the future you may find useful to use the interactive application<BR><BR><BR>InsightApplications/<BR>ThresholdSegmentationLevelSetFltkGui<BR><BR><BR>That allows you to set all this parameters interactively and see the<BR>evolution of the level set iteration by iteration.<BR><BR>Note that it is *very* important to monitor/supervise the level set<BR>because if you run it for too few iterations the tumor will be under<BR>segmented, an if you run it for too many, the level set will leak and<BR>start invading other brain structures.<BR><BR>Looking at the level set as it is evolving is the best way to figure<BR>out how many iterations are enough for stopping the level set.<BR><BR>By fine tunning the values of the lower/upper thresholds, the curvature<BR>scaling and the number of iterations you will be able to refine the<BR>borders of the segmented region.<BR><BR>You could also post-process the segmented image with a filter such as<BR>the BinaryMedianImageFilter or
 the new itkVotingBinaryImageFilter.<BR><BR><BR><BR>Please find attached the PNG image with the tumor segmented from your<BR>image.<BR><BR><BR><BR>Regards,<BR><BR><BR>Luis<BR><BR><BR><BR>---------------------------------------------------------------------------<BR>neha k wrote:<BR><BR>&gt; Hello Luis,<BR>&gt; <BR>&gt; Thanks for your reply. While using this filter, with my Brain tumor <BR>&gt; Image attached, I am not getting any luck with application, i have tried <BR>&gt; different parameter values. <BR>&gt; I am not sure what Level Set filters would be good to delineate tumor in <BR>&gt; my image attached. Smoothing did not seem to help for using <BR>&gt; ThresholdLevelSet and ShapeDetection Level Set. My original Image is <BR>&gt; RAW with .mhd header file.<BR>&gt; Any suggestions? How can I tune pramaters to separate tumor? What type <BR>&gt; of preprocessing and other filters might help?<BR>&gt; <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; Tired of spam? Yahoo! Mail has the best spam protection around<BR>&gt; http://mail.yahoo.com<BR>&gt;
 <BR>&gt; ------------------------------------------------------------------------<BR>&gt; <BR><BR><BR><BR>&gt; ATTACHMENT part 2 image/png name=tumor57Segmented.png<BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br> 
<a href="http://us.rd.yahoo.com/mail_us/taglines/security/*http://promotions.yahoo.com/new_mail/static/protection.html">Yahoo! Mail</a> - You care about security. So do we.