[Insight-users] GeodesicActiveContourLevelSetImageFilter output- help needed
Luca Antiga
luca.antiga at gmail.com
Thu Jul 10 04:58:42 EDT 2008
Hi Gita,
indeed the front can propagate in both directions in GAC.
Obviously, if you have a positive propagation weight, your level sets
will tend to grow outwards no matter what position they have.
Propagation in fact means inflation in the normal direction with
higher speed where the feature image has a higher value (i.e. where
the image gradient magnitude is low).
If your initialization is close to the final boundary, you may want
to only turn on the advection term (and eventually curvature) and
avoid propagation, in order for the level set to have a chance to
travel either inwards or outwards depending on its initial position.
As to your observation on propagation scaling, higher propagation
scaling doesn't make a difference if the other two scalings are zero.
This is because the time step is automatically adjusted to the speed
with which level sets are moving (it's a numerical stability
constraint). However, if you have one of the other two scalings set
to a nonzero value, you may get a faster propagation when the
propagation scaling is higher. In a sense, you have to think that the
scalings only make real sense relative to each other.
Luca
On Jul 8, 2008, at 8:20 AM, Gita Das wrote:
>
> Dear Luca,
> Thank you so much for your reply. After I converted the GAC output
> and initial level set files from .nii to .mhd, the size became huge
> & I had to tar & compress.
> The hotmail didn't allow me to upload. I am trying to place them in
> our e-research system & if successful, you can view later.
>
> In the meantime I had a bit of experimentation with the code & had
> a few findings.
> In the ITK example code using BrainProtonDensitySlice.png, the
> input to the GAC is the output of a fast
> marching filter and the output looks like -3,-1.5,-0.5,+0.5,+1.4,
> +2.4,+3 i.e kind of symmetrical values.
> After a bit of play, I noticed that if the initial level set lies
> completely inside the object boundary then I can have an output
> that looks like above.
> However, in my case the object boundary is not fully inside. I was
> under the impression that in GAC the front
> can propagate in both directions. Is that true? Or, the initial
> level set has to lie completely inside?
>
> Previously I set my SetMaximumRMSError to 0.02 & after one
> iteration it stopped. However, if the RMS error is set very low then
> more iterations are being performed & eventually all the +1,0,+1
> values are replaced by -4. Thus the segmentation
> looks wider (fatter) than it should be. To my observation, with
> higher propagation scaling value the front moves faster & less
> number of iterations are required.
>
> Any help/suggestions/clarifications would be greatly appreciated.
> Regards,
> Gita
>
>
> ----------------------------------------
>> CC: insight-users at itk.org
>> From: luca.antiga at gmail.com
>> Subject: Re: [Insight-users]
>> GeodesicActiveContourLevelSetImageFilter output- help needed
>> Date: Thu, 3 Jul 2008 10:55:33 +0200
>> To: das_gita at hotmail.com
>>
>> Hi Gita,
>> the -4 +4 values depend on the way
>> SparseFieldLevelSetImageFilter is
>> implemented, segmentation parameters won't have any effect on that.
>>
>> Level set segmentation produce a surface in output, which is the
>> surface
>> located at the zero-level of your output volume. Note that the zero
>> level
>> may not be defined exactly at a voxel, but may be located on an edge
>> between two voxels, e.g. in 1D, you may have
>> -0.5 0.5
>> +-----+
>> with your zero level located in the middle of the edge. Similarly for
>> nD.
>> In fact, the level set volume represents an approximate distance
>> function
>> from the zero level surface. To save in computational resources, such
>> function
>> is built for 4 layers around the zero level set (hence the -4 +4).
>> Those intermediate values you mention (-1 +1, ...) are the values of
>> the distance
>> function whose zero level describes the surface.
>> The bottomline is, the (interpolated) zero level set surface is what
>> you're interested
>> in, don't worry about the other values.
>>
>> There's one point I don't understand: how is it that playing with
>> sigma makes -1 +1
>> disappear? For some reason I can't open your images: can you post
>> them in another
>> format?
>>
>> Regards
>>
>> Luca
>>
>>
>>
>> On Jul 3, 2008, at 2:00 AM, Gita wrote:
>>
>>>
>>> Hallo All,
>>>
>>> I am trying to use a GeodesicActiveContourLevelSetImageFilter to
>>> fine
>>> tune my segmented image.
>>> The segmented image is used as the initial level set and the raw
>>> scan
>>> (after processed by Smoothing, Gradient Magnitude and Sigmoid
>>> filters)
>>> is used as the feature image. A sigma value of 0.5 is used for
>>> Smoothing
>>> filter. The values of alpha and beta (for Sigmoid filter) are -12
>>> and 49
>>> (as K1=85, k2=13 for the image at the output of GradientMagnitude
>>> filter). The value of propagationScaling is 1.
>>>
>>> The input images have been re-sampled to produce isotropic voxels
>>> and
>>> the output pixel type has been set as float.
>>>
>>> A portion of my code:
>>>
>>> typedef itk::GeodesicActiveContourLevelSetImageFilter
>>> GeodesicActiveContourFilterType;
>>> GeodesicActiveContourFilterType::Pointer geodesicActiveContour =
>>> GeodesicActiveContourFilterType::New();
>>> geodesicActiveContour->SetPropagationScaling
>>> ( propagationScaling );
>>> geodesicActiveContour->SetCurvatureScaling( 1.0 );
>>> geodesicActiveContour->SetAdvectionScaling( 1.0 );
>>> geodesicActiveContour->SetMaximumRMSError( 0.02 );
>>> geodesicActiveContour->SetNumberOfIterations(800 );
>>> geodesicActiveContour->SetInput(inputSeg);//initial level set
>>> geodesicActiveContour->SetFeatureImage(sigmoid->GetOutput()
>>> );//feature image
>>> geodesicActiveContour->Update();
>>> writeIm (geodesicActiveContour->GetOutput(), "geo.nii.gz");
>>>
>>> Please find attached files for segmented and output images.
>>>
>>> Q1: The output image geo.nii.gz i.e output of
>>> GeodesicActiveContourLevelSetImageFilter) has a value of 4 in the
>>> innermost region, then 1, then 0, then 1 and -4. Please see the
>>> attached
>>> file. The contour having a value of 0 is rather closer to my initial
>>> segmentation. The one with -4 makes the vessels much fatter. I
>>> thought I
>>> should get a 0-value corresponding to boundary, +ve inside & -ve
>>> outside. I do not understand why I get 1-0-1 layers. Although while
>>> playing with the value of sigma I noticed significant changes in the
>>> output. For ex. with sigma=3, 1-0-1 almost disappears from
>>> boundary as
>>> seen in the attached image. However, for some slices I still get
>>> values
>>> other than 4 in the inside region which leads to funny results. I
>>> tried
>>> to change propagation, curvature and advection values as well as the
>>> number of iterations. None of them had any effect on output except
>>> sigma.
>>>
>>> How can I choose the parameters that will produce good segmentation.
>>>
>>> Q2: Also, what determines the value of 4/-4? Is it determined by the
>>> value of alpha and beta? I tried to use a different ratio but the
>>> output
>>> is still the same.
>>>
>>> Any help would be greatly appreciated.
>>> Kind regards,
>>> Gita Das
>>> http://www.nabble.com/file/p18249367/geo.nii.gz geo.nii.gz
>>> http://www.nabble.com/file/p18249367/bourkeleft2_carotid_seg.nii.gz
>>> bourkeleft2_carotid_seg.nii.gz
>>>
>>>
>>> --
>>> View this message in context: http://www.nabble.com/
>>> GeodesicActiveContourLevelSetImageFilter-output--help-needed-
>>> tp18249367p18249367.html
>>> Sent from the ITK - Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>>
> I
>
> _________________________________________________________________
> Want to help Windows Live Messenger plant more Aussie trees?
> http://livelife.ninemsn.com.au/article.aspx?id=443698
More information about the Insight-users
mailing list