[vtkusers] vtkDistanceWidget and Dicom Images

Leonardo M. Ramé l.rame at griensu.com
Tue Oct 19 15:14:27 EDT 2010


On 2010-10-19 14:45:22 -0400, John Drescher wrote:
> On Tue, Oct 19, 2010 at 2:40 PM, Leonardo M. Ramé <l.rame at griensu.com> wrote:
> > On 2010-10-19 14:27:19 -0400, John Drescher wrote:
> >> >
> >> > Wait a minute. I am doing that myself with this code. That works..
> >> >
> >> > if (fZAxisSpacing > 0.0) {
> >> >        double spacing[3];
> >> >        m_pImage->GetSpacing(spacing);
> >> >        pChangeInfo->SetInput(m_pImage);
> >> >        spacing[2] = fZAxisSpacing;
> >> >        pChangeInfo->SetOutputSpacing(spacing);
> >> >        pChangeInfo->Update();
> >> >        m_pImage = pChangeInfo->GetOutput();
> >> > }
> >> >
> >> > This changes the z axes spacing because the vtkGDCMImageReader that I
> >> > use does not get the spacing correct in that direction for all image
> >> > types that I need to read.
> >> >
> >>
> >> pChangeInfo was defined before the conditional as:
> >>
> >> vtkSmartPointer<vtkImageChangeInformation> pChangeInfo =
> >>                       vtkSmartPointer<vtkImageChangeInformation>::New();
> >>
> >> John
> >
> > Look, this is my code, setting the spacing with m_imageDataVTK does the
> > same as vtkImageChangeInformation::SetOutputSpacing, the spacing is
> > right, the measure is correct, but the image is small on screen. I think
> > what I need is some way to Zoom in the image.
> >
> 
> I do not use vtkImageViewer2 but in my code (derived from vtkINRIA3d
> google for that if you like) moves the camera to zoom in.
> 
> John

Could it be that vtkImageViewer2 is ignoring the "z" scaling?

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com



More information about the vtkusers mailing list