imagesplit.image.image_wrapper module
A wrapper for a multi-dimensional image with an origin offset
-
class
imagesplit.image.image_wrapper.
ImageStorage
(numpy_image=None)[source]
Bases: object
Abstraction for storing image data in an arbitrary orientation
Allows storing of data without assuming the order in which the dimensions
are stored in memory or indexed. This allows images to be indexed using
the [x,y,z] convention while the numpy ordering is actually [z,y,x]
-
copy
()[source]
Returns a new object with a copy of the underlying data
-
classmethod
create_empty
(size, dtype)[source]
Create empty object of the specified global size and data type
-
flip
(do_flip)[source]
Return a copy of image data flipped using global ordering
-
classmethod
from_raw_image
(raw, size=None)[source]
Create ImageStorage object from this image data array
-
get
(selector)[source]
Returns part of the image data using the specified selectors
-
get_image
()[source]
Creates and returns an Image object for this data
-
get_raw
()[source]
Return raw image array; might not be in global dimension ordering
-
get_raw_image
()[source]
Return raw image array in the standard PIL dimension ordering
-
get_size
()[source]
Returns the image size in the global dimension ordering scheme
-
get_type
()[source]
Returns the underlying data type
-
reshape
(new_shape)[source]
Return a reshaping of the image data using global ordering
-
set
(selector, image)[source]
Replaces part of the image data using the specified selectors
-
transpose
(order)[source]
Return a transpose of the image data using global ordering
-
class
imagesplit.image.image_wrapper.
ImageWrapper
(origin, image_size=None, image=None)[source]
Bases: imagesplit.image.image_wrapper.ImageWrapperBase
Multi-dimensional image array with an origin
-
get_sub_image
(start, size)[source]
Returns the corresponding subimage
-
transform_coords
(sub_image)[source]
Transforms sub_image start, size to this coordinate system
-
transform_sub_image
(sub_image)[source]
Transforms sub_image to this coordinate system
-
class
imagesplit.image.image_wrapper.
ImageWrapperBase
(origin, image_size=None, image=None)[source]
Bases: object
Multi-dimensional image array with an origin
-
set_sub_image
(sub_image)[source]
Replaces part of the image with the corresponding subimage
-
transform_coords
(sub_image)[source]
Transforms sub_image start, size to this coordinate system
-
transform_sub_image
(sub_image)[source]
Transforms sub_image to this coordinate system
-
class
imagesplit.image.image_wrapper.
SmartImage
(start, size, image, transformer)[source]
Bases: imagesplit.image.image_wrapper.ImageWrapper
Image wrapper which converts between Axes
-
coords_to_other
(transformer)[source]
Converts coordinates to another system
-
transform_coords
(sub_image)[source]
Transforms sub_image start, size to this coordinate system
-
transform_sub_image
(sub_image)[source]
Transforms sub_image to this coordinate system
-
transform_to_other
(transformer)[source]
Returns this image transformed to a different local system