[vtkusers] vtkDistanceWidget and Dicom Images
Jothy
jothybasu at gmail.com
Tue Oct 19 13:20:24 EDT 2010
Try ResetCameraClippingRange() on renderer.
Jothy
On Tue, Oct 19, 2010 at 6:18 PM, Leonardo M. Ramé <l.rame at griensu.com>wrote:
> On 2010-10-19 13:09:51 -0400, John Drescher wrote:
> > On Tue, Oct 19, 2010 at 9:46 AM, Leonardo M. Ramé <l.rame at griensu.com>
> wrote:
> > > Hi, I use this code to add a vtkDistanceWidget to a scene showing a
> > > Dicom image:
> > >
> > > distanceWidget = vtkDistanceWidget::New();
> > > distanceWidget->SetInteractor(this->GetInteractor());
> > >
> static_cast<vtkDistanceRepresentation*>(distanceWidget->GetRepresentation())->SetLabelFormat("%-#6.2f
> mm");
> > > distanceWidget->On();
> > >
> > > The problem here is the measures I'm getting from the distance widget
> > > are not related to the real image. For example, when I measure one
> image
> > > with another Dicom viewer, it shows that I has 360mm width, and the
> > > vtkDistanceWidget says it has 1748,30mm.
> > >
> > > How can I define the relation between the size of the real image and
> the
> > > representation I'm showing on screen?
> > >
> >
> > Is the spacing correct in the vtkImageData?
> >
> > John
>
> Thanks, if I apply a spacing of 0.20, got it from dicom tag (0028,0030),
> it measures exactly as the other Dicom Viewer.
>
> ...but, now my image is rendered too small, I have to zoom it with the
> mouse. Is there a way to render it to fill the QVTKWidget regardless of
> its size?
>
> --
> Leonardo M. Ramé
> http://leonardorame.blogspot.com
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101019/e53d6116/attachment.htm>
More information about the vtkusers
mailing list