[Insight-users] ReinitializeLevelSetImageFilter

Bryn Lloyd blloyd at vision.ee.ethz.ch
Fri Mar 6 09:18:50 EST 2009


Hi Karthik,

Thanks for the answer.

The reason why I believe this is the case is that when I pass an image 
with spacings [0.1, 0.1, 0.5]mm I get distance value around 1.0mm, while 
corresponding distance values (from a distance map) are approx. 0.1mm.


Actually, now I looked at the code in ReinitializeLevelSetImageFilter.txx.

It does NOT set the OutputSpacing and Origin of the FastMarching object, 
i.e. this must be BUG.

--Bryn











Karthik Krishnan wrote:
> Bryn:
> 
> I don't think that is true. The Reinitialize level set filter simply 
> relies on the fast marching filter to generate the signed distance 
> function. The fastmarching filter does take voxel anisotropicity into 
> account when marching the level set front.
> 
> See the lines involving the update equation in itkFastMarchingImageFilter.h
> 
>       const int axis = node.GetAxis();
>       const double spaceFactor = vnl_math_sqr( 1.0 / spacing[axis] );
>       const double value = double(node.GetValue());
>       aa += spaceFactor;
>       bb += value * spaceFactor;
>       cc += vnl_math_sqr( value ) * spaceFactor;
> 
> 
> On Fri, Mar 6, 2009 at 8:06 AM, Bryn Lloyd <blloyd at vision.ee.ethz.ch 
> <mailto:blloyd at vision.ee.ethz.ch>> wrote:
> 
>     Hi all,
> 
>     Do I understand correctly that the ReinitializeLevelSetImageFilter
>     does not use the spacing of the input image?
> 
>     If yes, I guess I need to resample the input image, in order to be
>     isotropic AND scale the results in order to have Euclidean
>     distances. Right?
> 
>     Thanks
>     Bryn
> 
> 
> 
> 
> 
>     _____________________________________
>     Powered by www.kitware.com <http://www.kitware.com>
> 
>     Visit other Kitware open-source projects at
>     http://www.kitware.com/opensource/opensource.html
> 
>     Please keep messages on-topic and check the ITK FAQ at:
>     http://www.itk.org/Wiki/ITK_FAQ
> 
>     Follow this link to subscribe/unsubscribe:
>     http://www.itk.org/mailman/listinfo/insight-users
> 
> 
> 
> 
> -- 
> Karthik Krishnan
> R&D Engineer,
> Kitware Inc.
> Ph: 518 371 3971 x119
> Fax: 518 371 3971


-- 
-------------------------------------------------
Bryn Lloyd
Computer Vision Laboratory
ETH Zürich, Sternwartstrasse 7
CH - 8092 Zürich, Switzerland
Tel: +41 44 63 26668
Fax: +41 44 63 21199
-------------------------------------------------


More information about the Insight-users mailing list