[Insight-users] multiple inputs and different size
Rashindra Manniesing
r.manniesing at erasmusmc.nl
Thu Jun 7 16:54:45 EDT 2007
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.
More information about the Insight-users
mailing list