[vtkusers] Use vtkDistanceWidget with dicom series

Richard Frank rickfrank at me.com
Tue Jan 12 08:32:54 EST 2016


I am trying to do the same thing - that is, use the  vtkdistance measure tool so that it stays facing the camera like a vtkfollower - and only use a parallel projection. The documentation says that the VTK distance to the representation will stay in the upper layer, but I guess it's really only valid  for 2D? The VTK measure distance widget seems to always behave in a 3-D fashion. 

Our client finds the placing of the widget difficult in 3-D, or perhaps I should say confusing, once they move the camera around the widget is floating in space somewhere.

If anyone knows a way to change the behavior of the widget let me know....

Thanks

Rick


> Message: 9
> Date: Mon, 11 Jan 2016 08:50:59 -0700 (MST)
> From: Mercusyo <gregory.baert at inserm.fr>
> To: vtkusers at vtk.org
> Subject: [vtkusers] Use vtkDistanceWidget with dicom series
> Message-ID: <1452527459805-5735911.post at n5.nabble.com>
> Content-Type: text/plain; charset=us-ascii
> 
> 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,
> 
> 


More information about the vtkusers mailing list