[Insight-developers] Level set inconsistencies

Joshua Cates cates@sci.utah.edu
Mon, 14 Oct 2002 10:45:08 -0600 (MDT)


Hi Jim,
> I have trying out a few of the level set methods in ITK.  I have stumbled across a few
> inconsistencies.
>  
> 1. SegmentationLevelSetImageFilters do not have the FeatureImage in the inputs array.  So you cannot
> simply connect a reader's output to the feature image input without calling
> UpdateLargestPossibleRegion on the reader first.

Yes this was a design mistake on my part.  I realized it soon after
checking it in and plan to fix it as soon as I have time.  Not sure why I 
decided to do it this way as it only makes things more complicated.

>  
> 2. The "sign" of the seed images is inconsistent between the SegmentationLevelSetImageFilters and the
> ShapeDetectionLevelSetFilter.  In the former, inside the seed region is positive, for the latter it
> is negative.
>  
> 4. I haven't dug through this yet, but it seems like I pass different information the
> SegmentationLevelSetImageFilters than to the ShapeDetectionLevelSetFilters.  For instance, the
> Segmentation* versions take a feature image that is converted to a speed function.  The Shape*
> versions take an "edge potential image".  It seems like there may be cases where we are passing the
> same information to the two filters but they we are using different terminology. In other cases, one
> of these superclasses is very general and may take more that one type of feature image (intensity,
> derivative, laplacian, etc.).



Agreed that we should address these issues.   Perhaps a good TCON 
discussion.  ShapeDetectionLevelSetFilter is implemented under Lydia's old 
level set base classes so there may be other issues.  I believe that the 
plan is to migrate it under the newer pde framework at some point. Lydia 
can confirm or deny.

For the time being, if you need to enforce consistancy in a pipeline, the 
level set segmentation framework has a parameter that will switch the sign 
convention.  UseNegativeFeatures()  


> Are the SegmentationLevelSetImageFilters restricted to a single connected seed region? Or can I
> specify 
> multiple seed regions?

One of the beauties of level set models is that they can split and join.  
So multiple seed regions should be no problem.  The isosurface you specify
is detected in the input and converted into the initial model for the
solver.  In practice this means your input could be a binary set of blobs
indicating seed regions.  (Note that single seed points will not be
effective.)


>  
> 
>  I am using code like the following for constructing the seed images
> 
>   typedef itk::Image<float,2> FloatImage;
>   typedef itk::FastMarchingImageFilter<FloatImage> FastMarcherType;
> 
>   FastMarcherType::Pointer marcher = FastMarcherType::New();
>   
>   // setup trial points
>   typedef FastMarcherType::NodeType NodeType;
>   typedef FastMarcherType::NodeContainer NodeContainer;
> 
>   NodeContainer::Pointer trialPoints = NodeContainer::New();
> 
>   NodeType node;
> 
>   FloatImage::IndexType index0 = {{150,245}};
>   
>   node.SetValue( 0.0 );
>   node.SetIndex( index0 );
>   trialPoints->InsertElement(0, node);
> 
>   marcher->SetTrialPoints( trialPoints );
>   
>   // specify the size of the output image
>   FloatImage::SizeType size = {{512,512}};
>   marcher->SetOutputSize( size );
> 
>   // Make the inside of circle of radius 8 negative or positive?
>   itk::ShiftScaleImageFilter<FloatImage, FloatImage>::Pointer shiftScale
>     = itk::ShiftScaleImageFilter<FloatImage, FloatImage>::New();
>   shiftScale->SetInput(marcher->GetOutput());
>   shiftScale->SetShift( -8.0 );
>   shiftScale->SetScale( -1.0 );
> 
> 
> Jim Miller 
> _____________________________________
> Visualization & Computer Vision
> GE Research
> Bldg. KW, Room C218B
> P.O. Box 8, Schenectady NY 12301
> 
> millerjv@research.ge.com <mailto:millerjv@research.ge.com> 
> 
> james.miller@research.ge.com
> (518) 387-4005, Dial Comm: 8*833-4005, 
> Cell: (518) 505-7065, Fax: (518) 387-6981 
> 
>  <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
> 
>  
>