[Insight-users] multiple inputs and different size
Luis Ibanez
luis.ibanez at kitware.com
Sat Jun 9 18:41:39 EDT 2007
Hi Rashindra,
Yes, in the case that you describe,
you should implement the functions:
GenerateInputRequestedRegion()
GenerateOutputInformation()
because the default implementation of
these methods assume that the input and
the output images are going to have the
same sizes.
Regards,
Luis
==========================
Rashindra Manniesing wrote:
>
> HI,
>
> Any advice on the following would be highly appreciated:
>
> I am writing a class derived from ImageToImageFilter which has two
> inputs and one output. One input and the output have the same properties
> (dimension, sizes, pixeltype), the other (optional) input has a
> different pixeltype and a different size (in x direction). It looks
> something like this (the optional second input can be set by public
> member functions)
>
> template <class TInputImage, class TOutputImage>
> class ITK_EXPORT A:
> public ImageToImageFilter<TInputImage,TOutputImage>
> {
> // input same size/dim as output
> // Input/OutputPixelType is real
>
> // Second input, different size/pixeltype
> typedef Image<std::complex<InputPixelType>, ImageDimension>
> SecondImageType;
> void SetSecondImage(const SecondImageType *);
> const SecondImageType * GetSecondImage(void);
>
> }
>
> Input2 is the fourier transform of input1 and internally, after the
> required calculations, the result (image) will be backtransformed to
> real domain (using itkFFTWComplextoReal ..).
>
> My questions:
>
> - Because itkFFTWComplexToReal already takes care of the different
> input/output size and pixeltype, is it still required to implement
> the functions GenerateOutputInformation() and
> GenerateInputRequestedRegion() ?
>
> - Am I correct by stating that if at least one of the (input/output)
> images has a different size than another one, these functions should be
> implemented?
>
>
> Many thanks for your help,
> Rashindra Manniesing.
>
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list