58 if ((input.depth() >= 0) && ((
unsigned int)input.depth() == CV_8S) && (input.channels() == 1))
62 else if (input.depth() == CV_8U && input.channels() == 1)
66 else if (input.depth() == CV_8U && input.channels() == 3)
70 else if (input.depth() == CV_16U && input.channels() == 1)
74 else if (input.depth() == CV_16U && input.channels() == 3)
78 else if (input.depth() == CV_32F && input.channels() == 1)
82 else if (input.depth() == CV_32F && input.channels() == 3)
86 else if (input.depth() == CV_64F && input.channels() == 1)
90 else if (input.depth() == CV_64F && input.channels() == 3)
96 MITK_WARN <<
"Unknown image depth and/or pixel type. Cannot convert OpenCV to MITK image.";
103 MITK_WARN <<
"Cannot start filter. OpenCV Image not set.";
137 mitkImage->GetGeometry(timeStep)->SetSpacing(this->
GetOutput()->GetGeometry()->GetSpacing());
138 mitkImage->GetGeometry(timeStep)->SetOrigin(this->
GetOutput()->GetGeometry()->GetOrigin());
139 mitkImage->GetGeometry(timeStep)->SetIndexToWorldTransform(this->
GetOutput()->GetGeometry()->GetIndexToWorldTransform());
141 mitk::ImageReadAccessor readAccess(this->
GetOutput());
142 mitkImage->SetImportVolume(readAccess.GetData(), timeStep);
144 mitkImage->Modified();