<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> typedef itk::Image< PixelType, Dimension > ImageType;<br> <br> typedef ImageType::SizeType SizeType;<br><br> typedef itk::ImageFileReader< ImageType > ReaderType;<br> typedef itk::ImageFileWriter< ImageType > WriterType;<br><br><br> ReaderType::Pointer reader = ReaderType::New();<br> WriterType::Pointer writer = WriterType::New();<br> <br> reader->SetFileName( argv[1] );<br> writer->SetFileName( argv[2] );<br><br> ImageType::Pointer image = reader->GetOutput(); <br> SizeType imageSize = image->GetLargestPossibleRegion().GetSize();<br><br> std::cout << "Image size: " << imageSize[0] << 'x' << imageSize[1] << 'x' << imageSize[2] <<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>