[Insight-users] Problem of reading binary image

Xiu xjiang01 at hotmail.com
Wed Mar 30 14:08:34 EDT 2011


Hi, all
 
I'm trying to read TIFF image which contains the pixel value of only 1 and 0
and use it as a binary image. But I found the pixel  value is changed from 1
and 0 to 198 and 160 after I read it. Is there anybody who can tell me how
to fix this problem? below is the code.
 
typedef itk::ImageFileReader< ImageType > ReaderType;
ReaderType::Pointer reader = ReaderType::New();
std::string filename = inputDirectoryName;
reader->SetFileName( filename );
reader->Update();
return reader->GetOutput();;
 
Thanks,
Xiu



--
View this message in context: http://itk-insight-users.2283740.n2.nabble.com/Problem-of-reading-binary-image-tp6224337p6224337.html
Sent from the ITK Insight Users mailing list archive at Nabble.com.


More information about the Insight-users mailing list