[Insight-users] cannot introduce data/MultiResMIRegistration

Luis Ibanez luis.ibanez at kitware.com
Fri, 30 Apr 2004 19:11:36 -0400


Hi Alexandra,


It is not clear why this in not working in
your system.


Here are something that you may want to try:



1) Do you have any spaces in the path that
    lead to the brainweb data files ?

    from your email it looks like there are
    spaces, but it is not clear if they result
    from text-wrapping in the email, or they
    really exist in your path.

    Spaces may be creating confusion in the
    parsing of arguments in the file reader...



2) Did you checked that the files have reading
    permissions for the user that is running the
    program ?




3) Could you please try reading the images
    with the one of simple examples in
    Insight/Examples/IO ?

    let's say  ImageReadWrite.cxx ....

    Just to verify that your ITK build is ok,
    and that the image files are readable.



Please let us know what you find.


     Thanks


         Luis





----------------------
Alexandra Badea wrote:

> Greetings!
> 
> I am using ITK on MAC OSX 10.3 and as a beginner  run into trouble.
> I have tried to work with MultiResMIRegistration, with my own data and  
> if the program complained I have downloaded sample data sets from  
> brainweb.
> Then I created a parameter file and tried to use both absolute and  
> relative paths to the data sets.  I have moved the volume data,  
> parameter file in the same directory with the executable.
> Both cases return errors.
> 
> Your help will be appreciated,
> 
> Alexandra
> 
> Here are the errors I get:
> 
> _____________________
>  1. using absolute paths in the parameter file
> ______________________
> [ithaka:~] alex%  
> /Users/alex/software/itk/itk_source/InsightApplications-1.6.0/ 
> MultiResMIRegistration/MultiResMIRegistration  
> /Users/alex/software/itk/itk_source/InsightApplications-1.6.0/ 
> MultiResMIRegistration/test_MI.txt
> Parsing input ...
> Fixed image filename:  
> /Users/alex/software/itk/itk_source/InsightApplications-1.6.0/ 
> MultiResMIRegistration/brainweb1e1a10f20a.mha
> Big Endian: 0
> Image Size: [181, 217, 180]
> Image Spacing: [1, 1, 1]Moving image filename:  
> /Users/alex/software/itk/itk_source/InsightApplications-1.6.0/ 
> MultiResMIRegistration/brainweb1e1a10f20b.mha
> Big Endian: 0
> Image Size: [181, 217, 180]
> Image Spacing: [1, 1, 1]Permute order: [0, 1, 2]Flip axes: [0, 0,  
> 0]Number of levels: 5
> Fixed image shrink factors: [4, 4, 1]Moving image shrink factors: [8,  
> 8, 1]Number of iterations: [10, 10, 10, 10, 10]Learning rates: [0.0001,  
> 1e-05, 5e-06, 1e-06, 5e-07]Translation scale: 320
> PGM directory: tesres
> 
> MetaImage: Read: Cannot open data file
> MetaImage: Read: Cannot open data file
> Error while reading in fixed image.
> Error occured during registration
> itk::ExceptionObject caught
> 
> itk::ExceptionObject (0x602820)
> Location: "Unknown"
> File:  /Users/alex/software/itk/itk_source/InsightToolkit-1.6.0/Code/IO/ 
> itkMetaImageIO.cxx
> Line: 259
> Description: File cannot be read
> 
> 
> Caught an ITK exception:
> 
> itk::ExceptionObject (0x602820)
> Location: "Unknown"
> File:  /Users/alex/software/itk/itk_source/InsightToolkit-1.6.0/Code/IO/ 
> itkMetaImageIO.cxx
> Line: 259
> Description: File cannot be read
> 
> _____________________
> 2. using relative paths in the parameter file
> ______________________
> 
> 
> [ithaka:~] alex%  
> /Users/alex/software/itk/itk_source/InsightApplications-1.6.0/ 
> MultiResMIRegistration/MultiResMIRegistration  
> /Users/alex/software/itk/itk_source/InsightApplications-1.6.0/ 
> MultiResMIRegistration/test_MI.txt
> Parsing input ...
> Fixed image filename: brainweb1e1a10f20a.mha
> Big Endian: 0
> Image Size: [181, 217, 180]
> Image Spacing: [1, 1, 1]Moving image filename: brainweb1e1a10f20b.mha
> Big Endian: 0
> Image Size: [181, 217, 180]
> Image Spacing: [1, 1, 1]Permute order: [0, 1, 2]Flip axes: [0, 0,  
> 0]Number of levels: 5
> Fixed image shrink factors: [4, 4, 1]Moving image shrink factors: [8,  
> 8, 1]Number of iterations: [10, 10, 10, 10, 10]Learning rates: [0.0001,  
> 1e-05, 5e-06, 1e-06, 5e-07]Translation scale: 320
> PGM directory: tesres
> 
> Couldn't open file: brainweb1e1a10f20a.mha
> Error while reading in fixed image.
> Error occured during registration
> itk::ExceptionObject caught
> 
> itk::ImageFileReaderException (0x602d00)
> Location: "Unknown"
> File:  /Users/alex/software/itk/itk_source/InsightToolkit-1.6.0/Code/IO/ 
> itkImageFileReader.txx
> Line: 101
> Description:  Could not create IO object for file brainweb1e1a10f20a.mha
> 
> 
> Caught an ITK exception:
> 
> itk::ImageFileReaderException (0x602d00)
> Location: "Unknown"
> File:  /Users/alex/software/itk/itk_source/InsightToolkit-1.6.0/Code/IO/ 
> itkImageFileReader.txx
> Line: 101
> Description:  Could not create IO object for file brainweb1e1a10f20a.mha
> 
> 
> _____________
> The parameter file is a text file containing the following lines:
> _____________
> 
> brainweb1e1a10f20a.mha
> 0
> 181 217 180
> 1.0 1.0 1.0
> brainweb1e1a10f20b.mha
> 0
> 181 217 180
> 1.0 1.0 1.0
> 0 1 2
> 0 0 0
> 5
> 4 4 1
> 8 8 1
> 10 10 10 10 10
> 1e-4 1e-5 5e-6 1e-6 5e-7
> 320
> tesres
> 
> __________________________
> the header file contains the following lines and it's located in the  
> same place like the *.raw file
> _________________________
> NDims = 3
> DimSize = 181 217 180
> ElementType = MET_UCHAR
> ElementSpacing = 1.0 1.0 1.0
> ElementByteOrderMSB = False
> ElementDataFile = brainweb1e1a10f20.raw
> ______________________
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>