[Insight-users] Re: FMM spacing question : Fast Marching

Luis Ibanez luis . ibanez at kitware . com
Tue, 25 Nov 2003 10:01:52 -0500


Hi  Erik,

Thanks for pointing this out.

You are right, the FastMarching filter doesn't take
the spacing of the image into account.  This is also
true for most of the level set filters.   This behavior
is the result of a design decision. Considering the spacing
will introduce a hit in performance on the process of solving
the PDE associated with these filters.

Notice that there is a difference between 'using' the
spacing and 'carring' the spacing.  In the first case,
the spacing should be use as part of the computations
performed by the filter, in the second case, the filter
simply copies the spacing values from the input to the
output.  The FastMarching filter is not doing one nor
the other.  It would be easy to do just the 'carrying'
part, however you must be aware that the spacing is not
used during the computation. This is quite important since
in some cases the output of the fastmarching filter is
used as a distance map.


You could also use the ChangeInformation filter in order to
inject the origin and spacing information from the input
image into the output image.
http://www . itk . org/Insight/Doxygen/html/classitk_1_1ChangeInformationImageFilter . html


Unless your image is significantly big, the best solution
at this point is for you to use the ResampleImageFilter and
resample your image in order to get isotropic pixels.
http://www . itk . org/Insight/Doxygen/html/classitk_1_1ResampleImageFilter . html


Regards,


   Luis


--------------------
Erik Bekkers wrote:
> Luis,
> 
> This should be a really quick question: I'm using the
> Fast Marching Filter on a 3D image w/ spacing .8 .8
> 2.0, but the output from the FMM filter generates an
> image that is spacing 1 1 1; it also seems to be
> computing (values for distance etc.) with these
> unitary spacing values. Other pipelines of filters
> maintain the correct spacing.... how do I tell FMM to
> use the spacing in the image file it was given?
> 
> THanks,
> 
> Erik.
> 
> --- Luis Ibanez <luis . ibanez at kitware . com> wrote:
> 
>>Hi Erik,
>>
>>The VTK reader available in ITK only support the
>>".vtk" file format. The more recent ".vti" format
>>is not supported yet.
>>
>>It is a good item to add in the list of things to
>>do in the near future.
>>
>>Please use the ".vtk" file format, or the "Analyze"
>>file format. Note that ITK checks the extension of
>>the filename to be loaded and rejects non-standard
>>extensions. This features has been questioned and
>>it will probably be removed in the future.... in the
>>meantime, please make sure that your VTK images have
>>extension ".vtk" and the Analyze images have
>>extension
>>".hdr".
>>
>>The IO architecture in ITK is designed to make
>>it easy to load files. There is simply a limitation
>>to the number of file formats supported. The good
>>news is that the IO structure makes it very easy to
>>add new file formats.
>>
>>If by any chance you are already combining ITK and
>>VTK in your application, it will be pretty easy to
>>read the data with a VTK reader and convert it to
>>an ITK image using the filter adaptors available in
>>"InsightApplications/Auxiliary/vtk".
>>
>>
>>Please let us know if you encounter further
>>problems,
>>
>>
>>
>>Thanks,
>>
>>
>>
>>    Luis
>>
>>
>>
>>---------------------
>>Erik Bekkers wrote:
>>
>>>Luis,
>>>
>>>THanks for your previous help. I have another
>>
>>simple
>>
>>>question. I am trying to load in some VTK data
>>
>>into
>>
>>>ITK for processing, and have tried numerous
>>
>>different
>>
>>>input file formats (XML, .vti (ASCII), GE Signa)
>>
>>on my
>>
>>>program as well as the simple example programs,
>>
>>but I
>>
>>>always get an exception thrown on my file reader
>>
>>which
>>
>>>says:
>>>
>>>itk::ImageFileReaderException (00E0FB94)
>>>Location: "Unknown"
>>>File: c:\insighttoolkit-1.4.
>>>\code\io\itkImageFileReader.txx
>>>Line: 101
>>>Description:  Could not create IO object for file
>>>../../6395struct_pnts.vti
>>>
>>>Why can't itk create an IO object? I would think
>>
>>that
>>
>>>loading in files into itk, with its automatic file
>>>sensing capabilities, would be really easy: do I
>>
>>have
>>
>>>something configured wrong?
>>>
>>>THanks for any help,
>>>
>>>Erik.
>>>
>>>=====
>>>Erik Bekkers
>>>PhD Student, Stanford University
>>>Dept: Mechanical Engineering
>>>Division: Biomechanics
>>>
>>>__________________________________
>>>Do you Yahoo!?
>>>The New Yahoo! Shopping - with improved product
>>
>>search
>>
>>>http://shopping . yahoo . com
>>>
>>
>>
>>
>>
> 
> 
> =====
> Erik Bekkers
> PhD Student, Stanford University
> Dept: Mechanical Engineering
> Division: Biomechanics
> 
> __________________________________
> Do you Yahoo!?
> Free Pop-Up Blocker - Get it now
> http://companion . yahoo . com/
>