[Insight-developers] No longer can read a MetaImage in Linux!

Paul Yushkevich pauly at cognitica . com
Fri, 29 Aug 2003 12:06:50 -0400


Hi

I am getting an error opening a MetaImage file on Linux.  This is 
something very new, it used to work a week ago!

The program I am running is

void quicktest(void)
{
  typedef itk::Image<unsigned short,3> ImageType;
  typedef itk::ImageFileReader<ImageType> ReaderType;
  ReaderType::Pointer reader = ReaderType::New();
  
reader->SetFileName("/home/pauly/grant/itkapp/bingccdeb/SNAP/Images/image01.mha");
  reader->Update();
}

The file I'm reading is:

NDims = 3
DimSize = 181 217 181
ElementType = MET_UCHAR
ElementSpacing = 1.0 1.0 1.0
ElementByteOrderMSB = False
ElementDataFile = t1_ai_msles2_1mm_pn3_rf20.rawb

An the error that I get on Linux is

Arrays must have dependency or pre-specified lengths
MetaObject: Read: MET_Read Failed
MetaImage: M_Read: Error parsing file
MetaImage: Read: Cannot parse file
Aborted

This error is rather serious for SNAP, because it keeps is from loading 
image files on Linux.

Thanks!

Paul.