[Insight-users] Problem with reading binary image

xiu jiang xjiang01 at hotmail.com
Wed Mar 30 14:04:04 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
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110330/5b8f29d9/attachment.htm>


More information about the Insight-users mailing list