本文整理汇总了C++中mitk::datanode::Pointer::SetColor方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::SetColor方法的具体用法?C++ Pointer::SetColor怎么用?C++ Pointer::SetColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mitk::datanode::Pointer
的用法示例。
在下文中一共展示了Pointer::SetColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddDisplayPlaneSubTree
void AddDisplayPlaneSubTree()
{
// add the displayed planes of the multiwidget to a node to which the subtree
// @a planesSubTree points ...
float white[3] = {1.0f, 1.0f, 1.0f};
mitk::PlaneGeometryDataMapper2D::Pointer mapper;
mitk::IntProperty::Pointer layer = mitk::IntProperty::New(1000);
// ... of widget 1
m_PlaneNode1 =
(mitk::BaseRenderer::GetInstance(mitkWidget1->GetVtkRenderWindow()))->GetCurrentWorldPlaneGeometryNode();
m_PlaneNode1->SetColor(white, mitk::BaseRenderer::GetInstance(mitkWidget4->GetVtkRenderWindow()));
m_PlaneNode1->SetProperty("visible", mitk::BoolProperty::New(true));
m_PlaneNode1->SetProperty("name", mitk::StringProperty::New("widget1Plane"));
m_PlaneNode1->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
m_PlaneNode1->SetProperty("helper object", mitk::BoolProperty::New(true));
m_PlaneNode1->SetProperty("layer", layer);
m_PlaneNode1->SetColor(1.0, 0.0, 0.0);
mapper = mitk::PlaneGeometryDataMapper2D::New();
m_PlaneNode1->SetMapper(mitk::BaseRenderer::Standard2D, mapper);
// ... of widget 2
m_PlaneNode2 =
(mitk::BaseRenderer::GetInstance(mitkWidget2->GetVtkRenderWindow()))->GetCurrentWorldPlaneGeometryNode();
m_PlaneNode2->SetColor(white, mitk::BaseRenderer::GetInstance(mitkWidget4->GetVtkRenderWindow()));
m_PlaneNode2->SetProperty("visible", mitk::BoolProperty::New(true));
m_PlaneNode2->SetProperty("name", mitk::StringProperty::New("widget2Plane"));
m_PlaneNode2->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
m_PlaneNode2->SetProperty("helper object", mitk::BoolProperty::New(true));
m_PlaneNode2->SetProperty("layer", layer);
m_PlaneNode2->SetColor(0.0, 1.0, 0.0);
mapper = mitk::PlaneGeometryDataMapper2D::New();
m_PlaneNode2->SetMapper(mitk::BaseRenderer::Standard2D, mapper);
// ... of widget 3
m_PlaneNode3 =
(mitk::BaseRenderer::GetInstance(mitkWidget3->GetVtkRenderWindow()))->GetCurrentWorldPlaneGeometryNode();
m_PlaneNode3->SetColor(white, mitk::BaseRenderer::GetInstance(mitkWidget4->GetVtkRenderWindow()));
m_PlaneNode3->SetProperty("visible", mitk::BoolProperty::New(true));
m_PlaneNode3->SetProperty("name", mitk::StringProperty::New("widget3Plane"));
m_PlaneNode3->SetProperty("includeInBoundingBox", mitk::BoolProperty::New(false));
m_PlaneNode3->SetProperty("helper object", mitk::BoolProperty::New(true));
m_PlaneNode3->SetProperty("layer", layer);
m_PlaneNode3->SetColor(0.0, 0.0, 1.0);
mapper = mitk::PlaneGeometryDataMapper2D::New();
m_PlaneNode3->SetMapper(mitk::BaseRenderer::Standard2D, mapper);
// AddPlanesToDataStorage
if (m_PlaneNode1.IsNotNull() && m_PlaneNode2.IsNotNull() && m_PlaneNode3.IsNotNull() && m_Node.IsNotNull())
{
if (m_DataStorage.IsNotNull())
{
m_DataStorage->Add(m_PlaneNode1);
m_DataStorage->Add(m_PlaneNode2);
m_DataStorage->Add(m_PlaneNode3);
}
}
}