[vtkusers] dimensions of image

Sean McBride sean at rogue-research.com
Thu Jul 7 11:23:06 EDT 2005


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





More information about the vtkusers mailing list