[Insight-users] ResampleFilter for 3D image

Daniela Sacchetto danysunflower at hotmail.it
Tue May 25 04:26:24 EDT 2010







No, I tryed to resample a different 3D DICOM image.
Saturday afternoon ITK mailing list solved my problems with ResampleFilter: I didn't do the ''reader->Update()''before asking image's dimensions, so it was naturally that my code said me that it was a 0x0x0 image... ;-)
So, thanks a lot to Insight-users (expecially to 
            
                
                    
                    
                    Bill Lorensen) that solved my problem with GetLargestPossibleRegion().GetSize()
Regards,
Daniela




Date: Mon, 24 May 2010 13:26:15 -0400
Subject: Re: [Insight-users] ResampleFilter for 3D image
From: luis.ibanez at kitware.com
To: danysunflower at hotmail.it
CC: cquammen at cs.unc.edu; insight-users at itk.org

Hi Daniela,

Is this the same problem in which you found 
that the input DICOM series is only being 
read as a 1-slice dataset ?

Please let us know,


    Thanks


          Luis




--------------------------------
On Tue, May 18, 2010 at 12:54 PM, Daniela Sacchetto <danysunflower at hotmail.it> wrote:







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

 		 	   		  
Un mondo di personalizzazioni per Messenger, PC e cellulare

_____________________________________

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



 		 	   		  
_________________________________________________________________
Spazio gratis di 25 Gigabyte per archiviare ciò che vuoi
http://www.windowslive.it/skyDrive.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100525/2eb55504/attachment.htm>


More information about the Insight-users mailing list