fsl.data.bitmap
¶
This module contains the Bitmap
class, for loading bitmap image
files. Pillow is required to use the Bitmap
class.
-
fsl.data.bitmap.
BITMAP_EXTENSIONS
= ['.bmp', '.png', '.jpg', '.jpeg', '.tif', '.tiff', '.gif', '.rgba']¶ File extensions we understand.
-
fsl.data.bitmap.
BITMAP_DESCRIPTIONS
= ['Bitmap', 'Portable Network Graphics', 'JPEG', 'JPEG', 'TIFF', 'TIFF', 'Graphics Interchange Format', 'Raw RGBA']¶ A description for each
BITMAP_EXTENSION
.
-
class
fsl.data.bitmap.
Bitmap
(bmp)¶ Bases:
object
The
Bitmap
class can be used to load a bitmap image. TheasImage()
method will convert the bitmap into anImage
instance.-
property
name
¶ Returns the name of this
Bitmap
, typically the base name of the file.
-
property
dataSource
¶ Returns the bitmap data source - typically the file name.
-
property
data
¶ Convenience method which returns the bitmap data as a
(w, h, c)
array, wherec
is either 3 or 4.
-
property
shape
¶ Returns the bitmap shape -
(width, height, nchannels)
.
-
property