<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br>Thanks!!!!!!!!!!!!!!!!! Now my code go right!<br>Daniela<br><br>> Date: Sat, 22 May 2010 07:03:56 -0400<br>> Subject: Re: [Insight-users] Problem with GetLargestPossibleRegion().GetSize()<br>> From: bill.lorensen@gmail.com<br>> To: danysunflower@hotmail.it<br>> CC: insight-users@itk.org<br>> <br>> Before you ask for the output of the you must:<br>> reader->Update();<br>> <br>> <br>> On Sat, May 22, 2010 at 6:02 AM, Daniela Sacchetto<br>> <danysunflower@hotmail.it> wrote:<br>> > 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'<br>> > << imageSize[2] <<std::endl;<br>> ><br>> > [...]<br>> ><br>> > Giving a 800x500x97 DICOM ultrasound image (RGB) I continue to obtain 0x0x0<br>> > 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<br>> > that with ImageJ because it is a compressed dicom image ... Could it be a<br>> > problem to use GetLargestPossibleRegion()? I don't believe but I don't<br>> > understand why my code is wrong.....<br>> ><br>> ><br>> ><br>> > ________________________________<br>> > Tanti account di posta? Unisci tutto sotto Hotmail<br>> > _____________________________________<br>> > Powered by www.kitware.com<br>> ><br>> > Visit other Kitware open-source projects at<br>> > http://www.kitware.com/opensource/opensource.html<br>> ><br>> > Kitware offers ITK Training Courses, for more information visit:<br>> > http://www.kitware.com/products/protraining.html<br>> ><br>> > Please keep messages on-topic and check the ITK FAQ at:<br>> > http://www.itk.org/Wiki/ITK_FAQ<br>> ><br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.itk.org/mailman/listinfo/insight-users<br>> ><br>> ><br>                                            <br /><hr />Che w_b sarebbe senza la "e"? <a href='http://events.it.msn.com/internet-explorer-8' target='_new'> Scarica Internet Explorer 8</a></body>
</html>