[vtkusers] How do I get with/height from BMPReader?
Christopher M. Navarro
cnavarro at ncsa.uiuc.edu
Fri Apr 25 10:22:43 EDT 2003
Hi Ingo,
On Fri, 25 Apr 2003, De Boer Ingo wrote:
>
> Hi,
>
> > I don't think you could get a width/height from a bmp
> > file, right ?
> > *BUT* an imagedata has a width/height !
> Tried that. But idim is {0,0,0} !
>
> greets
> Ingo
>
>
> // Read bitmap from file
> vtkBMPReader *pvtkBMPReader = vtkBMPReader::New();
> pvtkBMPReader->SetFileName(cStrFilename);
I'd put an update right here because vtk is demand driven:
pvtkBMPReader->Update();
>
> int idim[3];
> pvtkBMPReader->GetOutput()->GetDimensions(idim);
>
> // delete objects
> pvtkBMPReader->Delete();
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-chris
More information about the vtkusers
mailing list