23 #include "vtkSmartPointer.h"
24 #include "vtkColorTransferFunction.h"
25 #include "vtkFloatArray.h"
49 unsigned int dimensions[4];
63 currentMITKIntensityImage->Initialize(FloatType, 2, dimensions);
64 currentMITKIntensityImage->SetSlice((
float*) imgGrabAcc2.GetData(),0,0,0);
67 currentMITKAmplitudeImage->Initialize(FloatType, 2, dimensions);
68 currentMITKAmplitudeImage->SetSlice((
float*)imgGrabAcc1.GetData(),0,0,0);
71 currentMITKDistanceImage->Initialize(FloatType, 2, dimensions);
72 currentMITKDistanceImage->SetSlice((
float*)imgGrabAcc0.GetData(),0,0,0);
78 ImageReadAccessor currentAmplAcc(currentMITKAmplitudeImage, currentMITKAmplitudeImage->GetSliceData(0, 0, 0));
79 float* amplitudeFloatData = (
float*) currentAmplAcc.
GetData();
86 ImageReadAccessor currentIntenAcc(currentMITKIntensityImage, currentMITKIntensityImage->GetSliceData(0, 0, 0));
87 float* intensityFloatData = (
float*) currentIntenAcc.
GetData();
94 ImageReadAccessor currentDistAcc(currentMITKDistanceImage, currentMITKDistanceImage->GetSliceData(0, 0, 0));
95 float* distanceFloatData = (
float*) currentDistAcc.
GetData();
170 float* floatData = (
float*)imgAcc.
GetData();
173 floatArrayInt->Initialize();
174 floatArrayInt->SetArray(floatData, numOfPixel, 0);
179 colorTransferFunction->RemoveAllPoints();
180 colorTransferFunction->AddRGBPoint(min, 0, 0, 0);
181 colorTransferFunction->AddRGBPoint(max, 1, 1, 1);
182 colorTransferFunction->SetColorSpaceToHSV();
183 colorTransferFunction->MapScalarsThroughTable(floatArrayInt, (
unsigned char*)openCVImage->imageData, VTK_LUMINANCE);
void SetImageDepth(unsigned int imageDepth)
set the depth of the image. Some functions of OpenCV do not support IPL_DEPTH_32F. Warning: changing from default results in a mapping of the pixel value through a lookup table IPL_DEPTH_1U 1 IPL_DEPTH_8U 8 IPL_DEPTH_16U 16 IPL_DEPTH_32F 32 (Default)
const void * GetData() const
Gives const access to the data.
DataCollection - Class to facilitate loading/accessing structured data.
void SetToFImageGrabber(mitk::ToFImageGrabber::Pointer imageGrabber)
set the ImageGrabber used for fetching image data from the camera
IplImage * m_CurrentOpenCVDistanceImage
OpenCV image holding the current distance data.
unsigned int m_ImageDepth
image depth currently used by this image source. Warning: Changing from default (IPL_DEPTH_32F) resul...
mitk::ToFImageGrabber::Pointer GetToFImageGrabber()
get the ImageGrabber used for fetching image data from the camera
IplImage * m_CurrentOpenCVIntensityImage
OpenCV image holding the current intensity data.
void MapScalars(mitk::Image::Pointer mitkImage, IplImage *openCVImage)
map scalars through lookup table
mitk::ToFImageGrabber::Pointer m_ImageGrabber
ImageGrabber used for fetching ToF image data from the camera.
void SetImageType(unsigned int imageType)
set type of image you want to grab. 0: Distance image (Default) 1: Amplitude image 2: Intensity image...
cv::Mat GetImage() override
Get current ToF image. Specify image you want to grab with SetImageType()
ImageReadAccessor class to get locked read access for a particular image part.
unsigned int m_ImageType
type of image currently supplied by this image source
IplImage * m_CurrentOpenCVAmplitudeImage
OpenCV image holding the current amplitude data.
Class for defining the data type of pixels.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.