Hi Miri,
the AccessByITK macros are designed for one generic image class only, as the
need to instantiate (number of data types)^(number of images) different classes
at compile time would lead to extremely long compiles. If you really do need a
completely generic way you would need to implement this yourself, but if you
either know the data type of your images directly, or in relation to the one
generic one (as in, e.g. the same) you might want to take a look at
mitk::CastToItkImage (see http://docs.mitk.org/nightly-qt4/group__Adaptor.html
the detailed description for more info).
So I would suggest either handing your function a vector of image pointers, or
just storing and accessing the images using class members via CastToItkImage .
Regards,
Caspar
Von: Miri Trope [mailto:[email protected]]
Gesendet: Sonntag, 6. November 2011 09:03
An: mitk-users
Betreff: [mitk-users] Insert multiple input images to a method in my module
Hi all,
How should I insert/manage multiple input images to a method in my module?
Until now, I inserted only one input image by accessIntegralPixelTypeByItk and
simply insert that image in my method like this:
//=======================
void myFilter::GenerateData()
{
mitk::Image::ConstPointer image = this->GetInput(0);
try
{
AccessInterslPixelTypeByItk_n(image, myMethod, (some_Inputs...))
}
}
//=======================
template<typename TPixel, unsigned int VImageDimension>
void myMethod (itk::Image<TPixel, VImageDimension>* image, some_Inputs)
{...}
//========================
Now, I'd like to insert multiple images (actually, four images) to my method.
How should I do this?
Thanks.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users