本文整理汇总了C++中mitk::image::Pointer::GetScalarValueMin方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetScalarValueMin方法的具体用法?C++ Pointer::GetScalarValueMin怎么用?C++ Pointer::GetScalarValueMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mitk::image::Pointer
的用法示例。
在下文中一共展示了Pointer::GetScalarValueMin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MapScalars
void ToFOpenCVImageGrabber::MapScalars( mitk::Image::Pointer mitkImage, IplImage* openCVImage)
{
unsigned int numOfPixel = m_ImageGrabber->GetCaptureWidth()*m_ImageGrabber->GetCaptureHeight();
float* floatData = (float*)mitkImage->GetSliceData(0, 0, 0)->GetData();
vtkSmartPointer<vtkColorTransferFunction> colorTransferFunction = vtkColorTransferFunction::New();
vtkSmartPointer<vtkFloatArray> floatArrayInt;
floatArrayInt = vtkFloatArray::New();
floatArrayInt->Initialize();
floatArrayInt->SetArray(floatData, numOfPixel, 0);
mitk::ScalarType min = mitkImage->GetScalarValueMin();
mitk::ScalarType max = mitkImage->GetScalarValueMaxNoRecompute();
MITK_INFO<<"Minimum: "<<min;
MITK_INFO<<"Maximum: "<<max;
colorTransferFunction->RemoveAllPoints();
colorTransferFunction->AddRGBPoint(min, 0, 0, 0);
colorTransferFunction->AddRGBPoint(max, 1, 1, 1);
colorTransferFunction->SetColorSpaceToHSV();
//TODO other depth values
colorTransferFunction->MapScalarsThroughTable(floatArrayInt, (unsigned char*)openCVImage->imageData, VTK_LUMINANCE);
}