<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi <br>I'm trying to get image size but I always obtain 0x0x0....<br>The code that I'm using is:<br><br>[...]<br><br>&nbsp; typedef itk::Image&lt; PixelType,&nbsp; Dimension &gt;&nbsp;&nbsp; ImageType;<br>&nbsp; <br>&nbsp; typedef ImageType::SizeType SizeType;<br><br>&nbsp; typedef itk::ImageFileReader&lt; ImageType &gt;&nbsp; ReaderType;<br>&nbsp; typedef itk::ImageFileWriter&lt; ImageType &gt;&nbsp; WriterType;<br><br><br>&nbsp; ReaderType::Pointer reader = ReaderType::New();<br>&nbsp; WriterType::Pointer writer = WriterType::New();<br>&nbsp; <br>&nbsp; reader-&gt;SetFileName( argv[1] );<br>&nbsp; writer-&gt;SetFileName( argv[2] );<br><br>&nbsp; ImageType::Pointer image = reader-&gt;GetOutput(); <br>&nbsp; SizeType imageSize = image-&gt;GetLargestPossibleRegion().GetSize();<br><br>&nbsp; std::cout &lt;&lt; "Image size: " &lt;&lt; imageSize[0] &lt;&lt; 'x' &lt;&lt; imageSize[1] &lt;&lt; 'x' &lt;&lt; imageSize[2] &lt;&lt;std::endl; <br><br>[...]<br><br>Giving a 800x500x97 DICOM ultrasound image (RGB) I continue to obtain 0x0x0 on my shell....<br>Could anyone help me?<br><br>Thanks,<br>Daniela<br><br>P.S. My image is a Dicom Image downloaded from ecography....I can't open that with ImageJ because it is a compressed dicom image ... Could it be a problem to use GetLargestPossibleRegion()? I don't believe but I don't understand why my code is wrong.....<br><br><br>                                               <br /><hr />Tanti account di posta? <a href='http://www.windowslive.it/hotmail/UnicaCasellaDiPosta.aspx' target='_new'>Unisci tutto sotto Hotmail</a></body>
</html>