[Insight-users] Re: Initial Level set as a PNG file ??

Luis Ibanez luis.ibanez at kitware.com
Sat, 24 Apr 2004 13:33:07 -0400


Hi Jayant,

Thanks for sending the images,

That explains everything.  You are providing
contours as inputs to the LevelSet filter.

You should explore some mechanism for filling
in the inside of the figure that you define
as the object.  The initial LevelSet should
look like a mask of the object.  The assumption
in level sets is that the contour of the object
is implicitly represented by one iso-value of
the image that you provide.



For example:

If you create the mask of your object, and fill
it in with a 255 level, while the background is
set at level =0, then you can claim that your
zero-set (the surface) is the iso-contour traced
at level = 128.


Regards,


   Luis


------------------------
Jayant Chauhan wrote:

> 
> 
> Hi Luis,
> 
> Gotcha. I have already sent you the images (feature image, init level 
> set and the results) along with the code. Am resending you just the 
> feature image and init level set image along with one of the contour 
> results.
> 
> with regards
> 
> Jayant Chauhan
> 
> 
> 
>  
> 
>  >From: Luis Ibanez <luis.ibanez at kitware.com>
>  >To: Jayant Chauhan <gripened at hotmail.com>
>  >CC: insight-users at itk.org
>  >Subject: [Insight-users] Re: Initial Level set as a PNG file ??
>  >Date: Sat, 24 Apr 2004 10:42:03 -0400
>  >
>  >Hi Jayant,
>  >
>  >1) You have multiple options:
>  >
>  >    1.1) You can read a PNG file using
>  >         ImageFileReader< itk::Image<float,2>>
>  >         In this case the pixel values are
>  >         casted to float during reading.
>  >
>  >    1.2) You can use the CastImageFilter after
>  >         the reader in order to convert pixels to float.
>  >
>  >    1.3) You can use the RescaleIntensityImageFilter
>  >         after the reader in order to convert to float
>  >         *and* rescale the intensities to a range of
>  >         negative and positive values
>  >
>  >    Note that rescaling is not really necessary since the
>  >    SegmentationLevelSetFilter (the superclass of most
>  >    segmentation LevelSet filters in ITK)
>  >http://www.itk.org/Insight/Doxygen/html/classitk_1_1SegmentationLevelSetImageFilter.html
>  >    has a SetIsoSurfaceValue() that allows you to specify
>  >    what is the value of the input level that you consider
>  >    to be the one representing the deformable surface.
>  >
>  >
>  >
>  >
>  >2) It is not clear yet what you mean
>  >    by "expansion in both ways"...
>  >
>  >
>  >3) ReverseExpansion allow you to invert the convention
>  >    of the level set being Positive inside and negative
>  >    inside, into the option of being negative inside and
>  >    positive inside.  In other words, you commute the
>  >    notion of "object" and "background".  If it you are
>  >    not getting anything as output, chances are that you
>  >    are propagating inwards and that the object is
>  >    collapsing into itself.
>  >
>  >4) You *shouldn't* specify your initial level set as
>  >    a contour.  The initial level set should be a MASK
>  >    of the object. The initial zero set is implicitly
>  >    assumed to be the edges of such mask.
>  >
>  >    If you are providing a contour, that probably explains
>  >    what you mean by propagating simultaneouly inwards, and
>  >    outwards.  The level set filter interprets your contour
>  >    as being *the object* and it is probably growing this
>  >    object in  all directions
>  >
>  >
>  >Could you please post the input image that you are
>  >providing as input to the level set filter. This image
>  >seems to be the real culprit of the problems you are
>  >experiencing.
>  >
>  >
>  >
>  >   Regards,
>  >
>  >
>  >     Luis
>  >
>  >
>  >---------------------
>  >Jayant Chauhan wrote:
>  >
>  >>Hey Fellas,
>  >>   1)Since PNG format allows only unsigned char and unsigned short,
>  >>does that mean I cannot specify my init level set as a png file ??
>  >>Because I do create my init level set from matlab by specifying
>  >>sign changes at the boundaries, but finally the image is rescaled
>  >>between 0 and 255 before being written, so could that be a problem
>  >>with my init level set expanding in both directions ??
>  >>  2)Or is it because of NARROW BAND effect ?? As in, the expansion
>  >>takes place both ways ??
>  >>  3) The ReverseExpansionDirection concept seems to be confusing
>  >>me. Could you please let me know as to what does it exactly do ?
>  >>When I do gacfilter->SetReverseExpansionDirection(false)
>  >>I get nothing after 100-1000 iterations.
>  >>  4) How is the fact that I specify my init level set as a contour
>  >>(ie, other than the boundary, all pixels have negative value)
>  >>different from specifying the level set as a region (asin, inner
>  >>region positive and outer negative) ? How will the outputs of
>  >>GACfilter vary with tis ??
>  >>  with regards
>  >>Jayant Chauhan
>  >>
>  >>------------------------------------------------------------------------
>  >>Let your desktop sizzle! Get the hottest wallpapers. Get the
>  >>hottest wallpapers. <http://g.msn.com/8HMAENIN/2755??PS=> Right
>  >>here at MSN Entertainment!
>  >
>  >
>  >
>  >_______________________________________________
>  >Insight-users mailing list
>  >Insight-users at itk.org
>  >http://www.itk.org/mailman/listinfo/insight-users
> 
> ------------------------------------------------------------------------
> Ready cash in just 72 hours. Apply Now !!! 
> <http://g.msn.com/8HMAENIN/2728??PS=>
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
>