86 m_VisFilter = mitk::NavigationDataObjectVisualizationFilter::New();
102 mitk::DataNode::Pointer newNode = mitk::DataNode::New();
103 QString name(
"DemoNode IGTLProviderExmpl T");
104 name.append(QString::number(i));
105 newNode->SetName(name.toStdString());
108 mitk::Surface::Pointer mySphere = mitk::Surface::New();
110 vtkSphere->SetRadius(2.0f);
111 vtkSphere->SetCenter(0.0, 0.0, 0.0);
113 mySphere->SetVtkPolyData(vtkSphere->GetOutput());
114 newNode->SetData(mySphere);
116 m_VisFilter->SetRepresentationObject(i, mySphere.GetPointer());
164 if (this->
m_Controls.visualizeCheckBox->isChecked())
173 mitk::RenderingManager::GetInstance()->RequestUpdateAll();
183 static mitk::NavigationData::Pointer previousND = mitk::NavigationData::New();
189 if ( !
mitk::Equal( *(previousND.GetPointer()), *curND ) )
192 previousND->Graft(curND);
197 static int previousValue = 0;
198 int currentValue = this->
m_Controls.visualizationUpdateRateSpinBox->value();
199 if (previousValue != currentValue)
201 m_Timer.setInterval(currentValue);
202 previousValue = currentValue;
212 mitk::DataStorage::SetOfObjects::ConstPointer rs = this->GetDataStorage()->GetAll();
213 auto bounds = this->GetDataStorage()->ComputeBoundingGeometry3D(rs);
221 mitk::Point3D center = bounds->GetCenterInWorld();
222 mitk::Geometry3D::BoundsArrayType extended_bounds = bounds->GetGeometryForTimeStep(0)->GetBounds();
223 for (
unsigned int i = 0; i < 3; ++i)
225 if (bounds->GetExtentInWorld(i) < 500)
228 extended_bounds[i * 2] = center[i] - 500 / 2.0;
229 extended_bounds[i * 2 + 1] = center[i] + 500 / 2.0;
233 bounds->GetGeometryForTimeStep(0)->SetBounds(extended_bounds);
236 mitk::RenderingManager::GetInstance()->InitializeViews(bounds);
MITKIGTBASE_EXPORT bool Equal(const mitk::NavigationData &leftHandSide, const mitk::NavigationData &rightHandSide, ScalarType eps=mitk::eps, bool verbose=false)
Equal A function comparing two navigation data objects for beeing equal in meta- and imagedata.