Hi Sascha,
I could, but who really has the time.
"Otherwise we assume that you are implicitly contributing your posted code
snippets to MITK under a compatible license."
I'm perfectly happy with that approach. I don't need any kind of attribution as
long as it may help people in the future.
Cheers,
Matthias
From: Sascha Zelzer [mailto:[email protected]]
Sent: Freitag, 26. Juli 2013 20:38
To: Noll, Matthias
Cc: [email protected]
Subject: Re: [mitk-users] Change request CastToItkImage for RGBA
Hi Matthias,
thanks for your report and code snippet. Would you be able to add a feature
request to our bugzilla database at http://bugs.mitk.org ? If you would like
some form of attribution (e.g. authorship of a git commit), you could look into
the contribution options explained here: http://mitk.org/How_to_contribute .
Otherwise we assume that you are implicitly contributing your posted code
snippets to MITK under a compatible license.
Thanks,
Sascha
On 07/25/2013 10:11 AM, Noll, Matthias wrote:
Dear List,
I was trying to apply some RGBA image interaction between mitk and itk using
the mitk::DataStorage and thus the CastToItkImage function of mitkImageCast.h.
I figured out, that all functions are defined for itk::Image with
itk::RGB<uchar> pixels. But unfortunately explicit functions for
itk::RGBA<uchar> are missing.
I don't know where to send the change request so I just write this mail.
This following code to enable itk::RGBA casting can and should be included in
the mitkImageCastPart4.cpp for future mitk versions.
typedef itk::Image<itk::RGBAPixel<unsigned char>, 2> itkImageRGBAUC2;
typedef itk::Image<itk::RGBAPixel<unsigned char>, 3> itkImageRGBAUC3;
namespace mitk
{
template <> void CastToItkImage<itkImageRGBAUC2>(const mitk::Image * mitkImage,
itk::SmartPointer<itkImageRGBAUC2>& itkOutputImage)
{
typedef itkImageRGBAUC2 ItkOutputImageType;
AccessFixedTypeByItk_1(mitkImage, _CastToItkImage2Access,
(itk::RGBAPixel<unsigned char>),
(::itk::GetImageDimension<ItkOutputImageType>::ImageDimension), itkOutputImage);
}
template <> void CastToItkImage<itkImageRGBAUC3>(const mitk::Image * mitkImage,
itk::SmartPointer<itkImageRGBAUC3>& itkOutputImage)
{
typedef itkImageRGBAUC3 ItkOutputImageType;
AccessFixedTypeByItk_1(mitkImage, _CastToItkImage2Access,
(itk::RGBAPixel<unsigned char>),
(::itk::GetImageDimension<ItkOutputImageType>::ImageDimension), itkOutputImage);
}
}
Regards,
Matthias
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users