[Insight-users] bug in the example configuration file of DeformableRegistration1.cxx?

Luis Ibanez luis.ibanez at kitware.com
Fri Feb 18 02:19:05 EST 2005


Hi

If you type

  ls -l ../../InsightToolkit-1.6.0/Examples/Data/RatLungSlice1.mha

from the directory where you are running this example,
do you get a list of the file ? or do you get an error
message like "file not found"

If so,
please try using an absolute path instead of a relative one.



   Regards,



       Luis



---------------------
Changhua Wu wrote:

> Hi,
> 
> I made the modication suggested by you. However, the
> error message I got is the same. I think the
> registration program did not parse the configuration
> file successfully at all since it reported that the
> reference file name is not given.
> 
> Changhua Wu
> 
> --- Luis Ibanez <luis.ibanez at kitware.com> wrote:
> 
> 
>>Hi Changhua,
>>
>>
>>Thanks for posting your parameter file.
>>
>>
>>The problem is that you modified the parameter file
>>and
>>put a number "2" in the Nz (number of slices along
>>Z).
>>
>>
>>This example is not registering 3D images.
>>It is intended to register two 2D slices.
>>
>>
>>The fixed  image is "RatLungSlice1.mha" which is a
>>2D image,
>>The moving image is "RatLungSlice2.mha" which is
>>another 2D image.
>>
>>
>>If you put a number different than 0 in the Nz
>>field,
>>the application would assume that you are loading 3D
>>images.
>>
>>
>>
>>
>>Please change your parameter file to:
>>
>>
>>
>>
>>% ----------------------------------
>>% Information about the image inputs
>>% ----------------------------------
>>128     % Nx (image x dimension)
>>128     % Ny (image y dimension)
>>0       % Nz (image z dimension - not used if 2D)
>>
> 
> ../../InsightToolkit-1.6.0/Examples/Data/RatLungSlice1.mha
> 
> ../../InsightToolkit-1.6.0/Examples/Data/RatLungSlice2.mha
> 
>>
>>
>>
>>    Regards,
>>
>>
>>
>>       Luis
>>
>>
>>
>>
>>========================================
>>----------------------
>>Changhua Wu wrote:
>>
>>>Hi Luis,
>>>
>>>Thank you so much for your kind help. I am able to
>>>read and write volume file now.
>>>
>>>I did not use any special character in  my
>>>configuration file. Actually I just copied it from
>>
>>the
>>
>>>pdf file and modify the directory of reference and
>>>target file name to 
>>>
>>
> ../../InsightToolkit-1.6.0/Examples/Data/RatLungSlice1.mha
> 
>>>% ReferenceFileName
>>>
>>
> ../../InsightToolkit-1.6.0/Examples/Data/RatLungSlice2.mha
> 
>>>% TargetFileName
>>>
>>>No other change was made. Attached is the
>>>configuration file. Would you have a look?
>>>
>>>Changhua 
>>>
>>>--- Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>>
>>>
>>>
>>>>Hi Changhua,
>>>>
>>>>Did you put the filenames of your images in the
>>>>configuration file ?
>>>>
>>>>Does the path to your images contain spaces or
>>>>special characters ?
>>>>
>>>>
>>>>   Luis
>>>>
>>>>
>>>>
>>>>--------------------
>>>>Changhua Wu wrote:
>>>>
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>I tried to run DeformableRegistration1.cxx found
>>>>
>>>>in
>>>>
>>>>
>>>>>the example of ITK 1.6.0. I used the
>>
>>configuration
>>
>>>>>file found on page 295 - 296 in
>>>>
>>>>ItkSoftwareGuide.pdf. 
>>>>
>>>>
>>>>>However, I got this output:
>>>>>
>>>>>Reading config file...parameter.txt
>>>>>Example configured. E 0 rho 0
>>>>>reading moving
>>>>>reading fixed
>>>>>Exception caught during reference file reading
>>>>>
>>>>>itk::ImageFileReaderException (0x813fd38)
>>>>>Location: "Unknown"
>>>>>File:
>>>>>
>>>>
> /home/wch/ITK-VTK/InsightToolkit-1.6.0/Code/IO/itkImageFileReader.txx
> 
>>>>>Line: 91
>>>>>Description: FileName must be specified
>>>>>
>>>>>It seems the program failed to read the names of
>>>>
>>>>the
>>>>
>>>>
>>>>>fixed and moving volumes. is there a bug in the
>>>>>configuration file given in ItkSoftwareGuide.pdf?
>>>>>Thanks.
>>>>>
>>>>>Changhua Wu
>>>>>
>>>>>
>>>>>
>>>>>	
>>>>>		
>>>>>__________________________________ 
>>>>>Do you Yahoo!? 
>>>>>Yahoo! Mail - You care about security. So do we. 
>>>>>http://promotions.yahoo.com/new_mail
>>>>>_______________________________________________
>>>>>Insight-users mailing list
>>>>>Insight-users at itk.org
>>>>>http://www.itk.org/mailman/listinfo/insight-users
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>		
>>>__________________________________ 
>>>Do you Yahoo!? 
>>>Yahoo! Mail - 250MB free storage. Do more. Manage
>>
>>less. 
>>
>>>http://info.mail.yahoo.com/mail_250
>>>
>>>
>>>
>>
> ------------------------------------------------------------------------
> 
>>>% Configuration file #1 for
>>
>>DeformableRegistration1.cxx
>>
>>>%
>>>% This example demonstrates the setup of a basic
>>
>>registration
>>
>>>% problem that does NOT use multi-resolution
>>
>>strategies. As a
>>
>>>% result, only one value for the parameters
>>
>>between
>>
>>>% (# of pixels per element) and (maximum
>>
>>iterations) is necessary.
>>
>>>% If you were using multi-resolution, you would
>>
>>have to specify
>>
>>>% values for those parameters at each level of the
>>
>>pyramid.
>>
>>>%
>>>% Note: the paths in the parameters assume you
>>
>>have the traditional
>>
>>>% ITK file hierarchy as shown below:
>>>%
>>>%
>>
> ITK/Insight/Examples/Registration/DeformableRegistration1.cxx
> 
>>>% ITK/Insight/Examples/Data/RatLungSlice*
>>>% ITK/Insight-Bin/bin/DeformableRegistration1
>>>%
>>>%
>>
> ---------------------------------------------------------
> 
> === message truncated ===
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com 
> 
> 





More information about the Insight-users mailing list