On 2/12/07, <b class="gmail_sendername">Pui Yu Lau</b> <<a href="mailto:pyl111@rogers.com">pyl111@rogers.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi everyone,<br><br> Thanks for the help in regards to the previous email. I sent a<br>followup email on a further problem, which may have been deleted from<br>the user list because I realized I started talking about vtk functions,
<br>thinking they were itk. Anyways, I'm hoping someone can help me in my<br>problem:<br><br>I am attempting to segment certain anatomical structures from 3D images<br>that have been sliced. I'm segmenting the structures using
<br>GeodesicActiveContour. However, at the end of the geodesicactivecontour<br>filter, I am left with a black and white image due to the binary<br>filter. I was wondering if there was any way I can extract the contour<br>
of my structure, then use the contour and apply it to my original<br>greyscale image (so it won't be black and white) and isolate the<br>structure, while keeping the rest of the image in black, for example.</blockquote>
<div><br>Sounds like a simple mask filter will do.. What exactly do you want here ? Try reading the software guide to be a bit more familiar with the suite of image processing algorithms available at your fingre tips<br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> My main focus is on getting the contour extraction, and I have been<br>recommended to look for some sort of morphological filter. Through the
<br>ITK guide, I looked up the binary and greyscale filters from the<br>mathematical morphology as well as section 7.6 on extracting regions,<br>but I cannot seem to find functions to do what I want. I was wondering<br>if anyone has any idea on what I may have overlooked or for suggestions
<br>on tackling my problem differently.<br><br>- PY<br><br><br>Luis Ibanez wrote:<br><br>><br>> Hi Pui,<br>><br>> Please read carefully the description of this filter<br>> in the ITK Software Guide.<br>>
<br>> <a href="http://www.itk.org/ItkSoftwareGuide.pdf">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>><br>> You seem to have missed many of the important feature<br>> of the example. It may be convenient for you to read
<br>> the previous sections on Level Sets. In particular the<br>> section on the FastMarching filter and the ShapeDetection<br>> filter.<br>><br>><br>> The source code of the GeodesicActiveContour example
<br>> is available at:<br>><br>><br>> Insight/Code/Segmentation/<br>> GeodesicActiveContourImageFilter.cxx<br>><br>><br>> In lines 319-320 you will find:<br>><br>> geodesicActiveContour->SetInput( fastMarching->GetOutput() );
<br>> geodesicActiveContour->SetFeatureImage( sigmoid->GetOutput() );<br>><br>><br>> Where the SetInput() method is setting the initial level set<br>> to be used by the GeodesicActiveContour filter. This initial
<br>> level set is computed in this particular case, as the output<br>> of a FastMarching image filter that is feed only with seed point.<br>> The fast marching filter in this case is simply producing a<br>> set of circles (or sphere) around the seed points.
<br>><br>> The SetFeatureImage() is connecting the image that is going<br>> to be used for computing the speed image. This feature image<br>> is computed as the sigmoid mapping of the gradient magnitude<br>> image. The goal is to have an image that has low (dark) value
<br>> in the edges where you want your level set to stop, and high<br>> (bright) values in the regions where you want the level set to<br>> propagate rapidly.<br>><br>><br>> The command line parameters passed to the example are described
<br>> in lines 128-137:<br>><br>> if( argc < 10 )<br>> {<br>> std::cerr << "Missing Parameters " << std::endl;<br>> std::cerr << "Usage: " << argv[0];
<br>> std::cerr << " inputImage outputImage";<br>> std::cerr << " seedX seedY InitialDistance";<br>> std::cerr << " Sigma SigmoidAlpha SigmoidBeta";<br>
> std::cerr << " PropagationScaling" << std::endl;<br>> return 1;<br>> }<br>><br>><br>><br>> a) Input image (the image to be segmented<br>> b) Ouput image (segmentation resulting from the level set)
<br>> c) (x,y) index coordinates of the seed point for FastMarching<br>> d) initial distance for fast marcing<br>> e) Sigma for the smoothing of the gradient magnitude filter<br>> f) Alpha and Beta parameters of the Sigmoid
<br>> g) Propagation scaling parameter for the Geodesic Active contour<br>><br>><br>><br>> In general the initial level set image could be *any* rough<br>> segmentation of the object. You could produce such initial
<br>> segmentation by a manual delineation, a quick region growing<br>> algorithm or a simple thresholding.<br>><br>> It is quite common to implement two-stage segmentation methods<br>> where the first stage only produces a quick and dirty segmentation,
<br>> that is then passed to a second stage where a level set method will<br>> fine tune the segmentatino. Note that level sets cannot perform<br>> magic on a poor initial segmentation. It is at least desirable for
<br>> the initial segmentation to be close to the edges of the object<br>> to be segmented.<br>><br>><br>><br>> Regards,<br>><br>><br>> Luis<br>><br>><br>> ==================
<br>> Pui Yu Lau wrote:<br>><br>>> Hi,<br>>><br>>> I'm a new user to ITK, and I've been trying to learn to use some<br>>> of the segmentation filters. I've been looking at the Geodesic
<br>>> Active Contour method, and I am confused on how it actually works.<br>>> Looking through the guide, it seems that it takes two initial image<br>>> inputs, where the first one is the initial level set, and the second
<br>>> is the feature image. However, when running the example of<br>>> GeodesicActiveContourImageFilter, the images used were<br>>> BrainProtonDensitySlice.png and<br>>> GeodesicActiveContourImageFilterOutput.png
, where the latter does not<br>>> exist. So, my question is, in this case, is the<br>>> BrainProtonDensitySlice the feature image (input), while the<br>>> GeodesicActiveContourImageFilterOutput is the initial level set
<br>>> (output)? If not, what exactly is the initial level set image?<br>>><br>>> - PY<br>>><br>>> _______________________________________________<br>>> Insight-users mailing list<br>>>
<a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br>>> <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>>><br>><br>><br>
<br><br>_______________________________________________<br>Insight-users mailing list<br><a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.