[Insight-users] FEM Initialization

Luis Ibanez luis.ibanez at kitware.com
Tue Dec 28 14:25:07 EST 2004


Hi Michael,


This exception is thrown when a filter receives a request for processing
a region that is, at least, partially outside the largest possible
region.

In order to understand the concepts of Regions in ITK images you must
read the "Getting Started I" tutorial:

http://www.itk.org/CourseWare/Training/GettingStartedI-WebPage/img0.html

You may find interesting the other tutorials too:
http://www.itk.org/HTML/Tutorials.htm


and, you should read the Data Representation chapter of the ITK software
guide:


          http://www.itk.org/ItkSoftwareGuide.pdf


- Largest possible region is the maximum size of the image.
- Requested region is a sub-part of the image, and it is usually
   managed in order to process an image by pieces. This is useful
   for multi-threading and for streaming data.


This exception is not related to the pixel spacing but to the
size and position of the image regions. A common reason for
getting this exception is to attempt to rerun a filter after
having changed its input image.


An easy way of finding the equivalent calls that you need
is to look at the code of

     Insight/Code/Algorithms/
              itkFEMRegistrationFilter.txx


to the ReadConfigFile() method in lines 338-546.




   Regards,


      Luis




------------------------
Michael Hardisty wrote:

> Hello ITK users,
>                          I am currently trying to deformambly register 
> two 3D CT images to each other.  They are both of the same bone, one is 
> just under load and the other is not.  I am registering in an attempt to 
> look at the deformation field.  I am currently attempting to use the FEM 
> frame work with ITK.  I have two questions in regards to usage of FEM.
> 
> 1)  I am doing a 3D registration of two uCT images and am getting the 
> following error.  Does anyone know what is causing this error?:
> "ExceptionObject caught !
> Requested region is (at least partially) outside the largest possible 
> region."
> 
> - I think that this exception may have something to do with the spacing 
> of  my images.  which have spacing: "0.0180441 X 0.0194318 X 
> 0.0192933".  Is it a requirement that the FEMRegistrationFilter have 
> spacing 1 X 1 X 1.  I have tracked this error to the following code in 
> "itkFEMRegistrationFilter.txx"
> 
> this->ComputeJacobian(1.,m_Field,2.5);
> 
> 2)  I wanted to initialize the filter from within the code and not use 
> the file IO that is showed in "DeformableRegistration1.cxx" because I am 
> putting this routine into a viewer as a plugin.  Is there an example or 
> documentation about how to properly initialize everything that is 
> necessary to use the FEMRegistrationFilter.  Many of the member 
> functions seem to provide the capability of initialization of 
> parameters.  However some parameters specified in the parameter file do 
> not seem to have equivalent member functions that are capable of 
> defining the same parameters. It is not clear how to set:  image 
> dimensions, or the lowestLevelScaling, which are set in the param file.  
> I have put the relevant bits of my code below:
> 
> thank you
> 






More information about the Insight-users mailing list