[vtkusers] dimensions of image
Amy Squillacote
amy.squillacote at kitware.com
Thu Jul 7 11:36:51 EDT 2005
Also you need to update the pipeline before you call methods like
these. The values you're getting back are the default values before the
pipeline executes. Try calling reader->Update(); at the very beginning of
your SetupCamera() method (just before vtkImageData* image =
reader->GetOutput();).
- Amy
At 11:23 AM 7/7/2005, Sean McBride wrote:
>On 2005-07-07 17:03, Renaud Isabelle said:
>
> >void SetupCamera()
> >{
> > vtkImageData* image = reader->GetOutput();
> > int dimension[2]; image->GetDimensions(dimension); --> 106200544,
> >0 ???????????????
> > float spacing[2]; image->GetSpacing(spacing); --> 1,1
> > float origin[2]; image->GetOrigin(origin); --> 0,0
> >
> >}
>
>Those 3 methods all expect arrays of 3 elements. So you need to declare
>your vars like:
>
>int dimension[3];
>
>not
>
>int dimension[2];
>
>--
>____________________________________________________________
>Sean McBride, B. Eng sean at rogue-research.com
>Rogue Research www.rogue-research.com
>Mac Software Developer Montréal, Québec, Canada
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list