本文整理汇总了C++中datanode::Pointer::SetIntProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::SetIntProperty方法的具体用法?C++ Pointer::SetIntProperty怎么用?C++ Pointer::SetIntProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类datanode::Pointer
的用法示例。
在下文中一共展示了Pointer::SetIntProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void mitk::FiberBundleXMapper2D::UpdateShaderParameter(mitk::BaseRenderer * renderer)
{
//get information about current position of views
mitk::SliceNavigationController::Pointer sliceContr = renderer->GetSliceNavigationController();
mitk::PlaneGeometry::ConstPointer planeGeo = sliceContr->GetCurrentPlaneGeometry();
//generate according cutting planes based on the view position
float sliceN[3], planeOrigin[3];
// since shader uses camera coordinates, transform origin and normal from worldcoordinates to cameracoordinates
planeOrigin[0] = (float) planeGeo->GetOrigin()[0];
planeOrigin[1] = (float) planeGeo->GetOrigin()[1];
planeOrigin[2] = (float) planeGeo->GetOrigin()[2];
sliceN[0] = planeGeo->GetNormal()[0];
sliceN[1] = planeGeo->GetNormal()[1];
sliceN[2] = planeGeo->GetNormal()[2];
float tmp1 = planeOrigin[0] * sliceN[0];
float tmp2 = planeOrigin[1] * sliceN[1];
float tmp3 = planeOrigin[2] * sliceN[2];
float d1 = tmp1 + tmp2 + tmp3; //attention, correct normalvector
float plane1[4];
plane1[0] = sliceN[0];
plane1[1] = sliceN[1];
plane1[2] = sliceN[2];
plane1[3] = d1;
float thickness = 2.0;
if(!this->GetDataNode()->GetPropertyValue("Fiber2DSliceThickness",thickness))
MITK_INFO << "FIBER2D SLICE THICKNESS PROPERTY ERROR";
bool fiberfading = false;
if(!this->GetDataNode()->GetPropertyValue("Fiber2DfadeEFX",fiberfading))
MITK_INFO << "FIBER2D SLICE FADE EFX PROPERTY ERROR";
// set Opacity
float fiberOpacity;
this->GetDataNode()->GetOpacity(fiberOpacity, NULL);
DataNode::Pointer node = this->GetDataNode();
node->SetFloatProperty("shader.mitkShaderFiberClipping.slicingPlane.w",plane1[3],renderer);
node->SetFloatProperty("shader.mitkShaderFiberClipping.slicingPlane.x",plane1[0],renderer);
node->SetFloatProperty("shader.mitkShaderFiberClipping.slicingPlane.y",plane1[1],renderer);
node->SetFloatProperty("shader.mitkShaderFiberClipping.slicingPlane.z",plane1[2],renderer);
node->SetFloatProperty("shader.mitkShaderFiberClipping.fiberThickness",thickness,renderer);
node->SetIntProperty("shader.mitkShaderFiberClipping.fiberFadingON",fiberfading,renderer);
node->SetFloatProperty("shader.mitkShaderFiberClipping.fiberOpacity",fiberOpacity,renderer);
}