[vtkusers] Use vtkDistanceWidget with dicom series

Mercusyo gregory.baert at inserm.fr
Mon Jan 11 10:50:59 EST 2016


Hello,

I use a vtkDistanceWidget in a dicom series files. It works with the code :

		m_HandleDistance = vtkPointHandleRepresentation2D::New();
		m_HandleDistance->GetProperty()->SetColor(1.0, 0.0, 0.0); // Red
		m_DistanceRep = vtkDistanceRepresentation2D::New();
		m_DistanceRep->SetHandleRepresentation(m_HandleDistance);
		m_DistanceWidget = vtkDistanceWidget::New();
		m_DistanceWidget->SetInteractor(vtkWindow1->GetInteractor());
		m_DistanceWidget->SetRepresentation(m_DistanceRep);
		static_cast<vtkDistanceRepresentation
*>(m_DistanceWidget->GetRepresentation())->SetLabelFormat("%-#6.3g mm");
		m_DistanceWidget->On();

In runtime, the distance is visible in all the slices of the series ...

Thanks,

Best regards,



--
View this message in context: http://vtk.1045678.n5.nabble.com/Use-vtkDistanceWidget-with-dicom-series-tp5735911.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list