[Insight-users] Reading the Visible Human cryo data

Brian Rowe briprowe at yahoo.com
Wed Jun 2 13:37:35 EDT 2004


I am trying to read a slice from the male cryo data
set, and I am getting an exception which has this
description:

Couldn't convert pixel type: 
    N3itk8RGBPixelIhEE
to one of: 
    h
    c
    t
    s
    j
    i
    m
    l
    f
    d

I am using this code to read in the file:

typedef itk::RGBPixel<unsigned char> PixelType;
const unsigned int Dimension = 2;
typedef itk::Image< PixelType, Dimension > ImageType; 
typedef itk::ImageFileReader< ImageType > FileType;
typedef itk::RawImageIO<PixelType, Dimension>
RawReaderType;

FileType::Pointer ImageFile = FileType::New();
RawReaderType::Pointer RawReader =
RawReaderType::New();

ImageFile->SetImageIO( RawReader );
ImageFile->SetFileName( filename );
RawReader->SetFileDimensionality( Dimension );

try{ ImageFile->Update(); } catch { ... }

I've looked at the file that throws the exception, but
it's not immediately clear to me what the problem is.

Thanks for your time

Brian


=====
1.79 x 10^12 furlongs per fortnight -- it's not just a good idea, it's the law!


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


More information about the Insight-users mailing list