[Insight-users] Problem with GetLargestPossibleRegion().GetSize()
Daniela Sacchetto
danysunflower at hotmail.it
Sat May 22 09:09:08 EDT 2010
Thanks!!!!!!!!!!!!!!!!! Now my code go right!
Daniela
> Date: Sat, 22 May 2010 07:03:56 -0400
> Subject: Re: [Insight-users] Problem with GetLargestPossibleRegion().GetSize()
> From: bill.lorensen at gmail.com
> To: danysunflower at hotmail.it
> CC: insight-users at itk.org
>
> Before you ask for the output of the you must:
> reader->Update();
>
>
> On Sat, May 22, 2010 at 6:02 AM, Daniela Sacchetto
> <danysunflower at hotmail.it> wrote:
> > Hi
> > I'm trying to get image size but I always obtain 0x0x0....
> > The code that I'm using is:
> >
> > [...]
> >
> > typedef itk::Image< PixelType, Dimension > ImageType;
> >
> > typedef ImageType::SizeType SizeType;
> >
> > typedef itk::ImageFileReader< ImageType > ReaderType;
> > typedef itk::ImageFileWriter< ImageType > WriterType;
> >
> >
> > ReaderType::Pointer reader = ReaderType::New();
> > WriterType::Pointer writer = WriterType::New();
> >
> > reader->SetFileName( argv[1] );
> > writer->SetFileName( argv[2] );
> >
> > ImageType::Pointer image = reader->GetOutput();
> > SizeType imageSize = image->GetLargestPossibleRegion().GetSize();
> >
> > std::cout << "Image size: " << imageSize[0] << 'x' << imageSize[1] << 'x'
> > << imageSize[2] <<std::endl;
> >
> > [...]
> >
> > Giving a 800x500x97 DICOM ultrasound image (RGB) I continue to obtain 0x0x0
> > on my shell....
> > Could anyone help me?
> >
> > Thanks,
> > Daniela
> >
> > 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.....
> >
> >
> >
> > ________________________________
> > Tanti account di posta? Unisci tutto sotto Hotmail
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.html
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
> >
_________________________________________________________________
nome.cognome @... Verifica la disponibilità sui NUOVI domini
https://signup.live.com/signup.aspx?mkt=it-it&rollrs=12&lic=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100522/0d970c38/attachment.htm>
More information about the Insight-users
mailing list