本文整理汇总了C++中image::Pointer::GetScalarValueMin方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetScalarValueMin方法的具体用法?C++ Pointer::GetScalarValueMin怎么用?C++ Pointer::GetScalarValueMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类image::Pointer
的用法示例。
在下文中一共展示了Pointer::GetScalarValueMin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: layer
void mitk::BinaryThresholdULTool::SetupPreviewNode()
{
if (m_NodeForThresholding.IsNotNull())
{
Image::Pointer image = dynamic_cast<Image*>( m_NodeForThresholding->GetData() );
Image::Pointer originalImage = dynamic_cast<Image*> (m_OriginalImageNode->GetData());
if (image.IsNotNull())
{
mitk::Image* workingimage = dynamic_cast<mitk::Image*>(m_ToolManager->GetWorkingData(0)->GetData());
if(workingimage)
m_ThresholdFeedbackNode->SetData( workingimage->Clone() );
else
m_ThresholdFeedbackNode->SetData( mitk::Image::New() );
int layer(50);
m_NodeForThresholding->GetIntProperty("layer", layer);
m_ThresholdFeedbackNode->SetIntProperty("layer", layer+1);
if (DataStorage* ds = m_ToolManager->GetDataStorage())
{
if (!ds->Exists(m_ThresholdFeedbackNode))
ds->Add( m_ThresholdFeedbackNode, m_OriginalImageNode );
}
if (image.GetPointer() == originalImage.GetPointer())
{
m_SensibleMinimumThresholdValue = static_cast<double>( originalImage->GetScalarValueMin() );
m_SensibleMaximumThresholdValue = static_cast<double>( originalImage->GetScalarValueMax() );
}
m_CurrentLowerThresholdValue = (m_SensibleMaximumThresholdValue + m_SensibleMinimumThresholdValue) / 3.0;
m_CurrentUpperThresholdValue = 2.0 * m_CurrentLowerThresholdValue;
IntervalBordersChanged.Send(m_SensibleMinimumThresholdValue, m_SensibleMaximumThresholdValue);
ThresholdingValuesChanged.Send(m_CurrentLowerThresholdValue, m_CurrentUpperThresholdValue);
}
}
}
示例2: layer
void mitk::BinaryThresholdULTool::SetupPreviewNode()
{
if (m_NodeForThresholding.IsNotNull())
{
Image::Pointer image = dynamic_cast<Image*>( m_NodeForThresholding->GetData() );
Image::Pointer originalImage = dynamic_cast<Image*> (m_OriginalImageNode->GetData());
if (image.IsNotNull())
{
// initialize and a new node with the same image as our reference image
// use the level window property of this image copy to display the result of a thresholding operation
m_ThresholdFeedbackNode->SetData( image );
int layer(50);
m_NodeForThresholding->GetIntProperty("layer", layer);
m_ThresholdFeedbackNode->SetIntProperty("layer", layer+1);
if (DataStorage* ds = m_ToolManager->GetDataStorage())
{
if (!ds->Exists(m_ThresholdFeedbackNode))
ds->Add( m_ThresholdFeedbackNode, m_OriginalImageNode );
}
if (image.GetPointer() == originalImage.GetPointer())
{
m_SensibleMinimumThresholdValue = static_cast<int>( originalImage->GetScalarValueMin() );
m_SensibleMaximumThresholdValue = static_cast<int>( originalImage->GetScalarValueMax() );
}
m_CurrentLowerThresholdValue = (m_SensibleMaximumThresholdValue + m_SensibleMinimumThresholdValue) / 3;
m_CurrentUpperThresholdValue = 2*m_CurrentLowerThresholdValue;
IntervalBordersChanged.Send(m_SensibleMinimumThresholdValue, m_SensibleMaximumThresholdValue);
ThresholdingValuesChanged.Send(m_CurrentLowerThresholdValue, m_CurrentUpperThresholdValue);
}
}
}