[vtkusers] How do I get with/height from BMPReader?

De Boer Ingo I.deBoer at polytec.de
Fri Apr 25 10:10:07 EDT 2003


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);

int idim[3];
pvtkBMPReader->GetOutput()->GetDimensions(idim);

// delete objects
pvtkBMPReader->Delete();



More information about the vtkusers mailing list