[Insight-users] Re: Resampling Error

Luis Ibanez luis.ibanez at kitware.com
Sun Jul 22 09:25:01 EDT 2007



Hi Vidya,


1) How much RAM memory do you have in your computer ?


2) What is the pixel type of your image ?


3) What is your operating system ?


4) Does your program only performs the resampling ?
    or do you have other ITK filters in the same
    pipeline ? remember that every ITK filter allocates
    memory for its output.


5) You don't need to restrict yourself to integer factors
    for super-sampling or sub-sampling.  Simply use the
    itk::ResampleImageFilter, and set up the image grid that
    you need. Use an itk::IdentityTransform, and the interpolator
    of your preference (itk::Linear interpolator is usually a
    good trade-off between quality and speed).



   Regards,


      Luis


------------------------
vidyaraj at vt.edu wrote:
> 
> Hello Luis,
> 
> I have a 3D image of size 250 X 300 X 200 which I want to resample to 256 X 256
> X 124. I wrote two programs (that work otherwise) to upsample and downsample
> images.
> Since the resampling factor for this conversion are non-integers; I wanted to
> first upsample by 128 x 64 31 and then downsample by 125 x 75 x 50. But when I
> tried to Upsample, I got the following message:
> 
> terminate called after throwing an instance of 'itk::ExceptionObject'
>   what():  /home/admin/Insight/Code/Common/itkImportImageContainer.txx:188:
> Failed to allocate memory for image.
> Abort
> 
> What do you think is the problem? Is the upsampling size too big? I know my code
> works becuase I have used them successfully for other small resampling
> instances.
> 
> Vidya
> 


More information about the Insight-users mailing list