|
| | TypedImage (const ImageDescriptor &descriptor, T *data=nullptr, Ownership own=Ownership::NotOwning) |
| | Create a new TypedImage from an ImageDescriptor.
|
| | TypedImage (const vec3i &dimensions, int numChannels=1, T *data=nullptr, Ownership own=Ownership::NotOwning) |
| | Create a new TypedImage with given dimensions and channels.
|
|
| TypedImage (const TypedImage &)=delete |
|
TypedImage & | operator= (const TypedImage &)=delete |
|
| TypedImage (TypedImage &&other) noexcept |
|
TypedImage & | operator= (TypedImage &&other) noexcept |
|
std::unique_ptr< TypedImage< T > > | clone () const |
| | Create a deep copy of the image.
|
|
bool | update (const TypedImage< T > &other) |
| | Update image data pointed to by this object. If the other image is not compatible with the current one the image is resized.
|
| bool | update (const MemImage &other) override |
| | Update image data pointed to by this object.
|
|
bool | update (const std::vector< T > &data) |
| | Update image data using non-image buffer. Data arrangement in this buffer is assumed to match the target image.
|
|
bool | update (const T *data) |
| | More generic and somewhat less secure version of the above method.
|
|
void | fill (T value) |
| | Fill image with the given constant value for all channels and pixels.
|
| void | fill (const std::vector< T > &channelValues) |
| | Fill image with the given channel values for all pixels.
|
| void | fillDouble (double value) override |
| | Fill image with the given double value for all channels and pixels.
|
| void | fillDouble (const std::vector< double > &channelValues) override |
| | Fill image with the given double channel values for all pixels.
|
|
const T * | pointer () const |
| | Returns a typed pointer to the underlying raw pixel buffer of the image.
|
|
T * | pointer () |
| const void * | data () const override |
| | Returns a void pointer to the underlying raw pixel buffer of the image.
|
| void * | data () override |
| T | value (int x, int y, int z=0, int c=0) const |
| | Return the pixel intensity at the coordinate without interpolation.
|
|
T | value (size_t index) const |
| | Return the pixel intensity at the index without interpolation.
|
| double | valueDouble (size_t index) const override |
| | Return the pixel intensity at the given index without interpolation casted to double.
|
| double | valueDouble (int x, int y, int z=0, int c=0) const override |
| | Return the pixel intensity at the coordinate without interpolation casted to double.
|
| double | valueDouble (double x, double y, double z=0, int c=0, bool clamp=true, bool *valid=nullptr) const override |
| | Return the pixel intensity at the given coordinate using linear interpolation casted to double.
|
| void | setValue (T value, int x, int y, int z=0, int c=0) |
| | Set the pixel intensity at the given coordinate to value.
|
| void | setValueDouble (double value, size_t index) const override |
| | Set the pixel intensity at the given index to value casted to the underlying type without any clamping or normalization.
|
| void | setValueDouble (double value, int x, int y, int z=0, int c=0) const override |
| | Set the pixel intensity at the given coordinate to value casted to the underlying type without any clamping or normalization.
|
|
std::pair< T, T > | getRange () const |
| | Computes the minimum and maximum image intensity of the entire image.
|
|
void | getRange (T &minVal, T &maxVal) const |
| void | getRangeDouble (double &minVal, double &maxVal) const override |
| | Computes the minimum and maximum image intensity of the entire image casted to double.
|
| std::unique_ptr< TypedImage< T > > | getSliceView (int slice) const |
| | Extract a MemImage representing a view onto the specified slice of this image.
|
|
std::pair< double, double > | getRangeDouble () const |
| | Computes the minimum and maximum image intensity of the entire image casted to double.
|
|
std::unique_ptr< MemImage > | clone () const |
| | Create a deep copy of the image.
|
| template<typename T> |
| TypedImage< T > * | typed () |
| | Convenience function to perform a dynamic_cast<TypedImage<T>> of this instance.
|
|
template<typename T> |
| const TypedImage< T > * | typed () const |
| ImageVariant | asVariant () |
| | Returns a std::variant containing a pointer to the concrete TypedImage type.
|
| ConstImageVariant | asVariant () const |
| | Returns a std::variant containing a const pointer to the concrete TypedImage type.
|
| Location | location () const override |
| | Specifies that the image resides in main memory.
|
|
bool | load (const std::string &filename, int64_t offset=0) |
| | Loads the image content from a file, returns true if successful.
|
|
bool | save (const std::string &filename) const |
| | Saves the image content to a file, returns true if successful.
|
|
std::pair< double, double > | getRangeDouble () const |
| | Computes the minimum and maximum image intensity of the entire image casted to double.
|
| std::unique_ptr< MemImage > | getSliceView (int slice) const |
| | Extract a MemImage representing a view onto the specified slice of this image.
|
|
| Image (const ImageDescriptor &desc) |
| | Create a new Image with the given descriptor.
|
|
| Image (const Image &other)=default |
|
Image & | operator= (const Image &other)=default |
|
| Image (Image &&other) noexcept=default |
|
Image & | operator= (Image &&other) noexcept=default |
|
const ImageDescriptor & | descriptor () const |
| | Return the image descriptor.
|
| void | configure (const Properties *p) override |
| | Configure the image descriptor from properties.
|
| void | configuration (Properties *p) const override |
| | Store image descriptor into properties.
|
|
void | setShift (double val) |
| | Sets the intensity shift value.
|
|
void | setScale (double val) |
| | Sets the intensity scale value.
|
|
void | setSpacing (double sx, double sy, double sz=1.0) |
| | Specify pixel/voxel spacing with two or three scalar values.
|
|
void | setSpacing (double sx, double sy, double sz, bool isMetric) |
| | Convenience function for specifying spacing and metric flag at the same time.
|
|
void | setSpacing (const vec3 &s) |
| | Specify pixel/voxel spacing using a 3-vector.
|
|
void | setSpacing (const vec3 &s, bool metric) |
| | Convenience function for specifying spacing and metric flag at the same time.
|
|
void | setMetric (bool val) |
| | Set data to be metric.
|
| double | storageToOriginal (double value) const |
| | Applies the image's shift and scale in order to convert value from storage pixel value domain to original pixel value domain.
|
| double | originalToStorage (double value) const |
| | Applies the image's shift and scale in order to convert value from original pixel value domain to storage pixel value domain.
|
|
PixelType | pixelType () const |
| | Returns the data type of the image.
|
|
Type | type () const |
| | Returns the data type of the image.
|
|
int | width () const |
| | Returns the width of the image.
|
|
int | height () const |
| | Returns the height of the image.
|
|
int | slices () const |
| | Returns the number of 3D slices of the image.
|
|
int | channels () const |
| | Returns the number of channels of the image.
|
|
double | shift () const |
| | Returns the intensity shift.
|
|
double | scale () const |
| | Returns the intensity scale.
|
|
vec3 | spacing () const |
| | Returns pointer to the pixel/voxel spacing values.
|
|
bool | isMetric () const |
| | Returns true if data is metric.
|
|
vec3 | extent () const |
| | Returns the physical size of the image as a vector.
|
|
vec3i | dimensions () const |
| | Returns the dimensions of the image in pixels as a vector.
|
|
vec3 | pixelToImage (const vec3 &pixel) const |
| | Convert a 3D pixel/voxel position to image coordinates.
|
|
vec3 | imageToPixel (const vec3 &world) const |
| | Convert 3D image coordinates to pixel/voxel position.
|
|
mat4 | pixelToImageMatrix () const |
| | Returns a 4x4 matrix to transform from image pixel space to image space.
|
|
mat4 | imageToPixelMatrix () const |
| | Returns a 4x4 matrix to transform from image space to image pixel space.
|
|
size_t | index (int x, int y, int z=0, int c=0) const |
| | Returns a linear memory index for a pixel or voxel.
|
|
bool | hasIndex (int x, int y, int z=0, int c=0) const |
| | Returns true if the pixel at (x,y,z) exists, false otherwise.
|
|
vec4i | coord (size_t index) const |
| | Returns the pixel/voxel coordinate (x,y,z,c) for a given index.
|
|
size_t | size () const |
| | Returns the size (number of elements) of the image.
|
|
int | typeSize () const |
| | Return the nominal size in bytes of standard data types, zero if unknown.
|
|
bool | isInteger () const |
| | Returns whether the image is of an integer data type.
|
|
bool | isSigned () const |
| | Returns whether the image type supports negative values.
|
|
size_t | byteSize () const |
| | Returns the size of the image in bytes.
|
|
int | alignment () const |
| | Returns the byte alignment of an image line (up to 8).
|
|
int | dimension () const |
| | Returns the spatial dimension of the image.
|
|
bool | compatible (const Image &other, bool ignoreType=false, bool ignore3D=false, bool ignoreChannels=false) const |
| | Tells if this image is compatible to another one.
|
| virtual void | configureDefaults () |
| | Retrieve the properties of this object, replaces values with their defaults and sets it again.
|
|
void | registerParameter (ParameterBase *param) |
| | Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration().
|
|
void | unregisterParameter (const ParameterBase *param) |
| | Remove the given Parameter or SubProperty from the list of registered parameters.
|
|
| Configurable (const Configurable &rhs) |
|
| Configurable (Configurable &&rhs) noexcept |
|
Configurable & | operator= (const Configurable &) |
|
Configurable & | operator= (Configurable &&) noexcept |