[Insight-users] visible human project data

H-B h4cd at yahoo.com
Tue Nov 30 16:46:06 EST 2010


Hello Jon,
 
thank you for this idea, i saw example VisibleHumanStreamReadWrite
 
but its for .raw data not .png 
so i am working in itkPNGImageIO, not in itkRawImageIO.
 
in the example with raw format, they create chanel for each color
// create a ImageIO for the red channel 
typedef itk::RawImageIO<PixelType, 2> ImageIOType;
ImageIOType::Pointer rimageio = ImageIOType::New();
rimageio->SetDimensions( 0, 2048 );
rimageio->SetDimensions( 1, 1216 );
rimageio->SetSpacing( 0, .33 );
rimageio->SetSpacing( 1, .33 );
rimageio->SetHeaderSize(rimageio->GetImageSizeInPixels()*0);
 
i just need the red one so i modefiy the code as follow (i dont know what they mean by spacing in the example but i think the but .33 for each chanel, for that i put 1 for the red chanel and zero for green and blue):
// create a ImageIO for the red channel
typedef itk::PNGImageIO ImageIOType;//itkPNGImageIO
ImageIOType::Pointer rimageio = ImageIOType::New();
rimageio->SetDimensions( 0, 2048 );
rimageio->SetDimensions( 1, 1216 );
rimageio->SetSpacing( 0, 1 );//was .33
rimageio->SetSpacing( 1, 1 );//was .33
 
 
is it right??



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101130/fe714337/attachment.htm>


More information about the Insight-users mailing list