[Insight-users] Advection in ThresholdLevelSetImageFilter
Luca Antiga
luca.antiga at gmail.com
Tue Sep 23 03:21:34 EDT 2008
Dear Dario,
I must say I don't agree with you.
"Advection" means that the level set term is of type \grad P \cdot
\grad \phi,
where P is an advection potential, such as | \grad I |, I being the
image, as in
geodesic active contours.
The way Laplacian zero-crossing acts is instead through the
"propagation"
term, G | \grad \phi |, where G is a proper advection speed, which in
case of
Laplacian zero crossings is simply the value of the laplacian (which
is zero
at the gradient magnitude ridges).
So, from a "purpose" point of view you're right, the laplacian tends
to attract
the surface to the ridges of the gradient magnitude, like the
advection term
does. However, it doesn't do it by advecting the level set with a
vector field,
but by propagating the level set using the laplacian. That's why the
Laplacian
should stay where it is and not be moved to CalculateAdvectionImage as
you're suggesting.
Best regards
Luca
On Sep 22, 2008, at 7:43 PM, Dário Oliveira wrote:
> Thank you Luis!
>
> I have seen it yesterday. I notice that I can also reimplement the
> method CalculateAdvectionImage and then the advection term makes
> sense. I got confused because the way I understood the method, this
> part of calculating the zero-crossing of the Laplacian should be
> exactly in the CalculateAdvectionImage method. Actually, as far as I
> understood, it modifies the speed image in such a way that the
> interface locks at edges. I guess I will modify it to use the
> laplacian zero-crossings in the advection term.
>
> Thank you.
> Dário Oliveira
>
> 2008/9/22 Luis Ibanez <luis.ibanez at kitware.com>:
>>
>> Hi Dario,
>>
>> Yes, the EdgeWeight plays in the ThresholdSegmentationLevelSet
>> a simlar role to the AdvectionWeight in the GeodesicActiveContour.
>>
>> When you set the EdgeWeight to non-zero, the filter computes a
>> Laplacian and uses it to drive the zero set closer to the
>> zero-crossings of the Laplacian.
>>
>>
>> The SmoothingConductance is used as a parameter for the Gradient
>> Anisotropic diffusion filter that is used inside of the Threshold
>> SegmentationLevelSetFunction, to smooth the image before computing
>> the Laplacian on it. Otherwise, the Laplacian will find a large
>> number of zero-crossings in all the small details (high spatial
>> frequency) of the image.
>>
>>
>> BTW: You can review all this by simply looking at the source code
>> of the file:
>>
>>
>> Insight/Code/Algorithms/
>> itkThresholdSegmentationLevelSetFunction.txx
>>
>>
>> in particular by looking at
>>
>>
>> lines 43-57:
>> =============
>>
>> if (m_EdgeWeight != 0.0)
>> {
>> diffusion->SetInput(this->GetFeatureImage());
>> diffusion->SetConductanceParameter(m_SmoothingConductance);
>> diffusion->SetTimeStep(m_SmoothingTimeStep);
>> diffusion->SetNumberOfIterations(m_SmoothingIterations);
>>
>> laplacian->SetInput(diffusion->GetOutput());
>> laplacian->Update();
>>
>> lit = ImageRegionIterator<FeatureImageType>(laplacian->GetOutput
>> (),
>>
>> this->GetFeatureImage()->GetRequestedRegion());
>> lit.GoToBegin();
>> }
>>
>>
>> and lines 77-85:
>> ================
>>
>>
>> if ( m_EdgeWeight != 0.0)
>> {
>> sit.Set( static_cast<ScalarValueType>(threshold + m_EdgeWeight *
>> lit.Get()) );
>> ++lit;
>> }
>> else
>> {
>> sit.Set( static_cast<ScalarValueType>(threshold) );
>> }
>>
>>
>> ----------------
>>
>>
>> "Glimpsing at the Source leaves no Doubt"
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> -----------------------
>> Dário Oliveira wrote:
>>>
>>> Dear all,
>>>
>>> I guess I miss something here. Why the advection scaling term is not
>>> applied in ThresholdLevelSetImageFilter? I performed some tests, and
>>> the value of advection scaling term makes no difference at all in
>>> the
>>> final result. Does the EdgeWeight term play the role of advection
>>> scaling?
>>>
>>> Another question... What does the smoothing conductance term?
>>>
>>> Thanks for your attention!
>>
>
>
>
> --
> Dário Oliveira
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list