[Insight-users] FEM Deformable Registration

Luis Ibanez luis.ibanez at kitware.com
Thu, 05 Feb 2004 16:42:46 -0500


Hi  Hari,

Many of the entries on the configuration file
of the FEM Deformable Registration filter are
dimension dependent.

That is, for 2D image they expect two values,
while for 3D images they expect three values.

For example:

      1 1    	% Scaling at lowest level of pyramid



Did you make sure to provide the appropriate
number of paramters in those entries  ?

Chances are that you are still providing two
values in one of them and the parser is getting
out of synch while reading the file.

Please post your FEM configuration file
to the list.


Thanks



    Luis



----------------------
Hari sundar wrote:

> Hi,
> 
> This is a really wierd problem that I am having. I modified the FEM
> deformable registration example to handle 3D datasets. It compiles fine,
> but does not read the config file properly. The config file is just
> modified from the orig. config file and I have tried keeping everything
> similar.
> 
> This is what happens when I run the program.
> As you can see, even the E and rho values are not read correctly. What
> could be the problem here ?
> 
> -Hari
> 
> -------------------------
> Reading config.txt
> Reading config file...config.txt
> Example configured. E 0 rho 0
> Moving File
> Fixed File
>  reading moving
>  reading fixed
> Exception caught during reference file reading
>                                                                                 
> itk::ImageFileReaderException (0x81458c8)
> Location: "Unknown"
> File: /usr/local/src/InsightToolkit-1.4.0/Code/IO/itkImageFileReader.txx
> Line: 91
> Description: FileName must be specified
> --------------------------
> 
> The relevant code ...
> 
> -----------------
> {
>     ElementType::LoadImplementationFunctionPointer fp = 
> &itk::fem::ImageMetricLoadImplementation<ImageLoadType>::ImplementImageMetricLoad;
>     DispatcherType::RegisterVisitor((ImageLoadType*)0,fp);
>   }
>   
>   {
>     ElementType2::LoadImplementationFunctionPointer fp =
> &itk::fem::ImageMetricLoadImplementation<ImageLoadType>::ImplementImageMetricLoad;
>     DispatcherType2::RegisterVisitor((ImageLoadType*)0,fp);
>   }
> 
>   RegistrationType::Pointer X = RegistrationType::New();
> 
>   X->SetConfigFileName(paramname);
>   std::cout << "Reading " << X->GetConfigFileName() << std::endl;
>   if ( !X->ReadConfigFile( (X->GetConfigFileName()).c_str() ) )  { 
>     return -1; 
>   }
>   
>   std::cout << "Moving File " << X->GetMovingFile() << std::endl;  
>   std::cout << "Fixed File " << X->GetFixedFile() << std::endl;
> 
> 
>   // Read the image files  
>   FileSourceType::Pointer movingfilter = FileSourceType::New();
>   movingfilter->SetFileName( (X->GetMovingFile()).c_str() );
>   FileSourceType::Pointer fixedfilter = FileSourceType::New();
>   fixedfilter->SetFileName( (X->GetFixedFile()).c_str() );
> ----------------------------
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>