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

Luis Ibanez luis.ibanez at kitware.com
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!