本文整理汇总了C++中image::Pointer::SetImportVolume方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::SetImportVolume方法的具体用法?C++ Pointer::SetImportVolume怎么用?C++ Pointer::SetImportVolume使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类image::Pointer
的用法示例。
在下文中一共展示了Pointer::SetImportVolume方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
mitk::Image::Pointer mitk::VolumeDataVtkMapper3D::GetMask()
{
if (this->m_Mask)
{
Image::Pointer mask = Image::New();
mask->Initialize(this->m_Mask);
mask->SetImportVolume(this->m_Mask->GetScalarPointer(), 0, 0, Image::ReferenceMemory);
mask->SetGeometry(this->GetInput()->GetGeometry());
return mask;
}
return 0;
}
示例2: InsertOpenCVImageAsMitkTimeSlice
void OpenCVToMitkImageFilter::InsertOpenCVImageAsMitkTimeSlice(cv::Mat openCVImage, Image::Pointer mitkImage, int timeStep)
{
// convert it to an mitk::Image
this->SetOpenCVMat(openCVImage);
this->Modified();
this->Update();
//insert it as a timeSlice
mitkImage->GetGeometry(timeStep)->SetSpacing(this->GetOutput()->GetGeometry()->GetSpacing());
mitkImage->GetGeometry(timeStep)->SetOrigin(this->GetOutput()->GetGeometry()->GetOrigin());
mitkImage->GetGeometry(timeStep)->SetIndexToWorldTransform(this->GetOutput()->GetGeometry()->GetIndexToWorldTransform());
mitk::ImageReadAccessor readAccess(this->GetOutput());
mitkImage->SetImportVolume(readAccess.GetData(), timeStep);
mitkImage->Modified();
mitkImage->Update();
m_ImageMutex->Lock();
m_Image = mitkImage;
m_ImageMutex->Unlock();
}