[vtkusers] How to get image dimensions

de Boer Ingo I.deBoer at polytec.de
Tue Oct 12 03:11:46 EDT 2004


Hi,

do something like

pvtkBMPReader = vtkBMPReader::New();
pvtkBMPReader->SetFileName("C:\\MyFile.bmp");
pvtkBMPReader->Update();
pvtkBMPReader->GetOutput()->GetDimensions(idim);

greets
 Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255

I'm trying to get the dimension of a bmp file using vtkBMPReader. I'm using GetDataExtent but I only get a vector with zeros.
This is the code I'm using for:

bmpReader = vtkBMPReader::New();
bmpReader->SetFileName("C:\\MyFile.bmp");

int Extent[6];
bmpReader->GetDataExtent(Extent);

Thanks in advance
John Mosso.



More information about the vtkusers mailing list