本文整理汇总了C++中mitk::image::Pointer::GetProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetProperty方法的具体用法?C++ Pointer::GetProperty怎么用?C++ Pointer::GetProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mitk::image::Pointer
的用法示例。
在下文中一共展示了Pointer::GetProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StartSimulation
void StartSimulation(FiberfoxParameters<double> parameters, FiberBundle::Pointer fiberBundle, mitk::Image::Pointer refImage, string message)
{
itk::TractsToDWIImageFilter< short >::Pointer tractsToDwiFilter = itk::TractsToDWIImageFilter< short >::New();
tractsToDwiFilter->SetUseConstantRandSeed(true);
tractsToDwiFilter->SetParameters(parameters);
tractsToDwiFilter->SetFiberBundle(fiberBundle);
tractsToDwiFilter->Update();
mitk::Image::Pointer testImage = mitk::GrabItkImageMemory( tractsToDwiFilter->GetOutput() );
testImage->SetProperty( mitk::DiffusionPropertyHelper::GRADIENTCONTAINERPROPERTYNAME.c_str(), mitk::GradientDirectionsProperty::New( parameters.m_SignalGen.GetGradientDirections() ) );
testImage->SetProperty( mitk::DiffusionPropertyHelper::REFERENCEBVALUEPROPERTYNAME.c_str(), mitk::FloatProperty::New( parameters.m_SignalGen.m_Bvalue ) );
mitk::DiffusionPropertyHelper propertyHelper( testImage );
propertyHelper.InitializeImage();
if (refImage.IsNotNull())
{
if( static_cast<mitk::GradientDirectionsProperty*>( refImage->GetProperty(mitk::DiffusionPropertyHelper::GRADIENTCONTAINERPROPERTYNAME.c_str()).GetPointer() )->GetGradientDirectionsContainer().IsNotNull() )
{
ItkDwiType::Pointer itkTestImagePointer = ItkDwiType::New();
mitk::CastToItkImage(testImage, itkTestImagePointer);
ItkDwiType::Pointer itkRefImagePointer = ItkDwiType::New();
mitk::CastToItkImage(refImage, itkRefImagePointer);
bool cond = CompareDwi(itkTestImagePointer, itkRefImagePointer);
if (!cond)
{
MITK_INFO << "Saving test and rference image to " << mitk::IOUtil::GetTempPath();
mitk::IOUtil::SaveBaseData(testImage, mitk::IOUtil::GetTempPath()+"testImage.dwi");
mitk::IOUtil::SaveBaseData(refImage, mitk::IOUtil::GetTempPath()+"refImage.dwi");
}
MITK_TEST_CONDITION_REQUIRED(cond, message);
}
}
}