27 unsigned int* dim =
new unsigned int[2];
31 image->Initialize(
mitk::PixelType(mitk::MakeScalarPixelType<float>()), 2, dim);
32 image->SetSlice(distances);
35 filter->SetImage(image);
36 cv::Mat cvImage = cv::Mat(filter->GetOpenCVImage(),
true);
37 double minVal, maxVal;
38 cv::minMaxLoc(cvImage, &minVal, &maxVal);
40 cvImage.convertTo(uCCImage, CV_8U, 255.0/(maxVal - minVal), -minVal);
41 cv::namedWindow(
"Debug Image", CV_WINDOW_AUTOSIZE);
42 cv::imshow(
"Debug Image", uCCImage);
43 cv::waitKey(10000000);
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
static void ToFDebugHelper::ShowCVDistanceImage(float *distances, unsigned int dimX, unsigned int dimY)
Class for defining the data type of pixels.