<DIV id=RTEContent>Hi,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I have to save an image of 55*239 pixels with spacing as 0.1496*0.01925. </DIV>  <DIV>&nbsp;</DIV>  <DIV>This seems to be easy. However, the image saved is not taking into account my pixel size but just the number of my pixels. </DIV>  <DIV>&nbsp;</DIV>  <DIV><FONT face="Courier New" size=2>  <div><STRONG><EM>ImageType::IndexType start;</EM></STRONG></div>  <div><STRONG><EM>start.Fill(0); </EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>ImageType::SizeType sz;</EM></STRONG></div>  <div><STRONG><EM>sz[0] = 239; </EM></STRONG></div>  <div><STRONG><EM>sz[1] = 55;</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>ImageType::RegionType region;</EM></STRONG></div>  <div><STRONG><EM>region.SetSize( sz );</EM></STRONG></div>  <div><STRONG><EM>region.SetIndex( start );</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>ImageType::Pointer
 shifty = ImageType::New();</EM></STRONG></div>  <div><STRONG><EM>shifty-&gt;SetRegions( region );</EM></STRONG></div>  <div><STRONG><EM>shifty-&gt;Allocate();</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>ImageType::SpacingType spacing ; </EM></STRONG></div>  <div><STRONG><EM>spacing[0] = 0.01925; </EM></STRONG></div>  <div><STRONG><EM>spacing[1] = 0.1496;</EM></STRONG></div>  <div><STRONG><EM>shifty-&gt;SetSpacing( spacing );</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>//compute shifty somehow</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div><FONT face="Courier New" size=2>  <div><STRONG><EM>typedef itk::RescaleIntensityImageFilter&lt;</EM></STRONG></div>  <div><STRONG><EM>ImageType, WriteImageType &gt; RescaleFilterType;</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>RescaleFilterType::Pointer rescaler = RescaleFilterType::New();</EM></STRONG></div> 
 <div><STRONG><EM>rescaler-&gt;SetOutputMinimum( 0 );</EM></STRONG></div>  <div><STRONG><EM>rescaler-&gt;SetOutputMaximum( 255 );</EM></STRONG></div>  <div><STRONG><EM>rescaler-&gt;SetInput( shifty );</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div><STRONG><EM>typedef itk::ImageFileWriter&lt; WriteImageType &gt; WriterType;</EM></STRONG></div>  <div><STRONG><EM>WriterType::Pointer writer = WriterType::New();</EM></STRONG></div>  <div><STRONG><EM>writer-&gt;SetFileName("shifty.jpg");</EM></STRONG></div>  <div><STRONG><EM>writer-&gt;SetInput( rescaler-&gt;GetOutput() );</EM></STRONG></div>  <div><STRONG><EM>writer-&gt;Update();</EM></STRONG></div>  <div><STRONG><EM></EM></STRONG>&nbsp;</div>  <div>By taking into account the pixel size, the saved image should be almost twice heigher than large. However, taking into account only the number of pixels, my saved image is 4 times larger than heigh. </div>  <div>&nbsp;</div>  <div>This is a medical image so my pixel
 size is very important to be aware of the physical dimensions of the image.</div>  <div>&nbsp;</div>  <div>Isabelle</div>  <div>&nbsp;</div></FONT></FONT></DIV><p>
                <hr size=1> 
<b><font color=#FF0000>Appel audio GRATUIT</font> partout dans le monde</b> avec le nouveau Yahoo! Messenger<br> 
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>