ImageDescription¶
- class toasty.image.ImageDescription(mode=None, shape=None, wcs=None)[source]¶
Bases:
object
Information about an image, without its actual bitmap data.
This comes in handy when processing a large block of images – often, one wants to analyze them all to determine some global settings, then do the actual processing on an image-by-image basis.
Attributes Summary
The image's pixel data format.
The shape of the image's data array.
The WCS information associated with the image, if available.
Methods Summary
Ensure that this ImageDescription has negative parity.
Invert the parity of this ImageDescription's WCS.
Get this ImageDescription's parity, based on its WCS.
Attributes Documentation
- dtype¶
- height¶
- mode = None¶
The image’s pixel data format.
- shape = None¶
The shape of the image’s data array.
- wcs = None¶
The WCS information associated with the image, if available.
- width¶
Methods Documentation
- ensure_negative_parity()[source]¶
Ensure that this ImageDescription has negative parity.
- Returns:
- self, for chaining convenience.
Notes
See
Image.ensure_negative_parity()
for detailed discussion. This method mgiht invert the WCS but, because image descriptions do not come with associated data, doesn’t do that.
- flip_parity()[source]¶
Invert the parity of this ImageDescription’s WCS.
- Returns:
- self, for chaining convenience.
Notes
See
Image.flip_parity()
for detailed discussion. This method inverts the WCS but, because image descriptions do not come with associated data, doesn’t do that.
- get_parity_sign()[source]¶
Get this ImageDescription’s parity, based on its WCS.
- Returns:
- Either +1 or -1, depending on the image parity.
Notes
See
Image.get_parity_sign()
for detailed discussion.