[Insight-users] ResampleFilter for 3D image

Daniela Sacchetto danysunflower at hotmail.it
Tue May 18 12:54:14 EDT 2010



Thanks.


I tryed to do what you said me but now I've a new problem.... I wanted
to preserv the original x and y dimension of my image and only reslice
it; I've to use  this resample filter with different images and so I
want a more general possible code.... so I try to do this:






#include <itkImageIORegion.h>   


[...]





InputImageType::Pointer image = reader->GetOutput();


SizeType imageSize = image->GetLargestPossibleRegion().GetSize();





but when I've this error:





terminate called after throwing an instance of 'itk::ExceptionObject'


  what():  /usr/local/include/InsightToolkit/IO/itkImageFileWriter.txx:271:


itk::ERROR: ImageFileWriter(0x8956220): Largest possible region does
not fully contain requested paste IO regionPaste IO region:
ImageIORegion (0xbfcc9ba8)


  Dimension: 3


  Index: 0 0 0 


  Size: 0 0 50 


Largest possible region: ImageRegion (0xbfcc9c04)


  Dimension: 3


  Index: [0, 0, 0]


  Size: [0, 0, 50]





Aborted





Could someone help me to solve this problem?


Thanks


Daniela
Date: Wed, 12 May 2010 07:47:28 -0400
Subject: Re: [Insight-users] ResampleFilter for 3D image
From: cquammen at cs.unc.edu
To: danysunflower at hotmail.it
CC: insight-users at itk.org

Daniela,
You commented out these lines
  //size[0] = 300;  // number of pixels along X  //size[1] = 300;  // number of pixels along Y
As a result, the values in size[0] and size[1] aren't initialized. In the error, you can see that these dimensions have the values 3216878376 and 138384173, which is surely much larger than the dimensions of your image. Please try uncommenting these lines and setting the image dimensions appropriately and report back what happens.

Thanks,
Cory
On Sun, May 9, 2010 at 6:22 AM, Daniela Sacchetto <danysunflower at hotmail.it> wrote:






Hi everyone
I'm new in itk....so, sorry for my (maybe stupid) questions.

I have to resample a 3D US image (it is a 97 frames image and I want to reduce its frame-number to 50).
I tried to adapt ResampleImageFilter (Examples/Filtering/ResampleImageFilter.cxx.) for 3D image. I wanted to run it to see how that filter works but  I've this error:


-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

terminate called after throwing an instance of 'itk::ExceptionObject'
  what():  /usr/local/include/InsightToolkit/IO/itkImageFileWriter.txx:271:
itk::ERROR: ImageFileWriter(0x9bac220): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0xbfbda908)

  Dimension: 3
  Index: 0 0 0 
  Size: 3216878376 138384173 50 
Largest possible region: ImageRegion (0xbfbda964)
  Dimension: 3
  Index: [0, 0, 0]
  Size: [3216878376, 138384173, 50]

Aborted
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


I think that my code is wrong but I don't find my (propably stupid) error....

I add my wrong code to this mail...

Thanks all
Daniela
 		 	   		  
Avatar per Messenger e sfondo per il PC Creali gratis!


_____________________________________

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




-- 
Cory Quammen
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)
Department of Computer Science
University of North Carolina at Chapel Hill

http://www.cs.unc.edu/~cquammen

 		 	   		  
_________________________________________________________________
Importa i tuoi amici di Facebook su Messenger
http://www.windowslive.it/importaAmici.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100518/654e9b2c/attachment-0001.htm>


More information about the Insight-users mailing list