47 unsigned int dimensions[4];
54 mitk::PixelType FloatType = MakeScalarPixelType<float>();
60 mitk::Image::Pointer currentMITKIntensityImage = mitk::Image::New();
61 currentMITKIntensityImage->Initialize(FloatType, 2, dimensions);
62 currentMITKIntensityImage->SetSlice((
float*) imgGrabAcc2.GetData(),0,0,0);
64 mitk::Image::Pointer currentMITKAmplitudeImage = mitk::Image::New();
65 currentMITKAmplitudeImage->Initialize(FloatType, 2, dimensions);
66 currentMITKAmplitudeImage->SetSlice((
float*)imgGrabAcc1.GetData(),0,0,0);
68 mitk::Image::Pointer currentMITKDistanceImage = mitk::Image::New();
69 currentMITKDistanceImage->Initialize(FloatType, 2, dimensions);
70 currentMITKDistanceImage->SetSlice((
float*)imgGrabAcc0.GetData(),0,0,0);
76 ImageReadAccessor currentAmplAcc(currentMITKAmplitudeImage, currentMITKAmplitudeImage->GetSliceData(0, 0, 0));
77 float* amplitudeFloatData = (
float*) currentAmplAcc.GetData();
83 ImageReadAccessor currentIntenAcc(currentMITKIntensityImage, currentMITKIntensityImage->GetSliceData(0, 0, 0));
84 float* intensityFloatData = (
float*) currentIntenAcc.GetData();
90 ImageReadAccessor currentDistAcc(currentMITKDistanceImage, currentMITKDistanceImage->GetSliceData(0, 0, 0));
91 float* distanceFloatData = (
float*) currentDistAcc.GetData();
161 ImageReadAccessor imgAcc(mitkImage, mitkImage->GetSliceData(0, 0, 0));
162 float* floatData = (
float*)imgAcc.GetData();
165 floatArrayInt->Initialize();
166 floatArrayInt->SetArray(floatData, numOfPixel, 0);
167 mitk::ScalarType min = mitkImage->GetStatistics()->GetScalarValueMin();
168 mitk::ScalarType max = mitkImage->GetStatistics()->GetScalarValueMaxNoRecompute();
169 MITK_INFO<<
"Minimum: "<<min;
170 MITK_INFO<<
"Maximum: "<<max;
171 colorTransferFunction->RemoveAllPoints();
172 colorTransferFunction->AddRGBPoint(min, 0, 0, 0);
173 colorTransferFunction->AddRGBPoint(max, 1, 1, 1);
174 colorTransferFunction->SetColorSpaceToHSV();
175 colorTransferFunction->MapScalarsThroughTable(floatArrayInt, (
unsigned char*)openCVImage->imageData, VTK_LUMINANCE);