Dear mitk users
I am trying convert a 2D mitk image obtaining using the OpenCVToMitkImageFilter
(from a video device):
m_Filter=mitk::OpenCVToMitkImageFilter::New();
//Input grabbed OpenCV image to the filter
m_Filter->SetOpenCVImage(img);
m_Filter->Update();
I am able to add and view the 2D mitk image in the datastorage.
I want to apply a filter on this mitk image (thresholding) and I understand
that I need to cast it into an itk image. I used the following steps:
-------------------------------------------------------------------------------------------------------
typedef unsigned char PixelType;
const unsigned int Dimension = 2;
typedef itk::Image< PixelType, Dimension > ImageType;
ImageType::Pointer itkImage = ImageType::New();
mitk::CastToItkImage(mitkImage.GetPointer(),itkImage);//Method if mitkimagetype
is known
--------------------------------------------------------------------------------------------------------
I used this method since the pixel time/dimension of mitkImage is known.
I get the following message:
WARNING: In
..\..\..\CAMDASS_Plugins\camdass.video.widget\src\internal\CamdassVideoWidgetView.cpp,
line 350
Pixel type class itk::RGBPixel<unsigned char> not supported by AccessByItk
I get the same message when I use the AccessByItk() macro as well. If the Pixel
type RGBPixel is not supported by the macro, is there another way I can convert
my mitk image to an itk image?
Any help is appreciated!
-Keshav
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users