Section: Visualization Toolkit IO Classes
BMPReader creates structured point datasets. The dimension of the dataset depends upon the number of files read. Reading a single file results in a 2D image, while reading more than one file results in a 3D volume.
To read a volume, files must be of the form "FileName.<number>" (e.g., foo.bmp.0, foo.bmp.1, ...). You must also specify the image range. This range specifies the beginning and ending files to read (range can be any pair of non-negative numbers).
The default behavior is to read a single file. In this case, the form of the file is simply "FileName" (e.g., foo.bmp).
To create an instance of class vtkBMPReader, simply invoke its constructor as follows
obj = vtkBMPReader
obj
is an instance of the vtkBMPReader class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkBMPReader = obj.NewInstance ()
vtkBMPReader = obj.SafeDownCast (vtkObject o)
int = obj.GetDepth ()
- Returns the depth of the BMP, either 8 or 24.
int = obj.CanReadFile (string fname)
- Is the given file a BMP file?
string = obj.GetFileExtensions ()
- Return a descriptive name for the file format that might be useful in a GUI.
string = obj.GetDescriptiveName ()
- If this flag is set and the BMP reader encounters an 8bit file,
the data will be kept as unsigned chars and a lookuptable will be
exported
obj.SetAllow8BitBMP (int )
- If this flag is set and the BMP reader encounters an 8bit file,
the data will be kept as unsigned chars and a lookuptable will be
exported
int = obj.GetAllow8BitBMP ()
- If this flag is set and the BMP reader encounters an 8bit file,
the data will be kept as unsigned chars and a lookuptable will be
exported
obj.Allow8BitBMPOn ()
- If this flag is set and the BMP reader encounters an 8bit file,
the data will be kept as unsigned chars and a lookuptable will be
exported
obj.Allow8BitBMPOff ()
- If this flag is set and the BMP reader encounters an 8bit file,
the data will be kept as unsigned chars and a lookuptable will be
exported
vtkLookupTable = obj.GetLookupTable ()