![]() |
Inviwo
0.9.10.1
Inviwo documentation
|
Inheritance diagram for inviwo::Image:Public Types | |
| using | DataBuffer = std::unique_ptr< std::vector< unsigned char > > |
Public Types inherited from inviwo::DataGroup< Image, ImageRepresentation > | |
| using | self = Image |
| using | repr = ImageRepresentation |
Public Member Functions | |
| Image (size2_t dimensions=size2_t(8, 8), const DataFormatBase *format=DataVec4UInt8::get()) | |
| Image (std::shared_ptr< Layer > layer) | |
| Image (const Image &) | |
| Image & | operator= (const Image &that) |
| virtual Image * | clone () const |
| virtual Document | getInfo () const |
| const Layer * | getLayer (LayerType, size_t idx=0) const |
| Layer * | getLayer (LayerType, size_t idx=0) |
| const Layer * | getColorLayer (size_t idx=0) const |
| Layer * | getColorLayer (size_t idx=0) |
| void | addColorLayer (std::shared_ptr< Layer > layer) |
| size_t | getNumberOfColorLayers () const |
| const Layer * | getDepthLayer () const |
| Layer * | getDepthLayer () |
| const Layer * | getPickingLayer () const |
| Layer * | getPickingLayer () |
| size2_t | getDimensions () const |
| void | setDimensions (size2_t dimensions) |
| DataBuffer | getLayerAsCodedBuffer (LayerType layerType, const std::string &fileExtension, size_t idx=0) const |
| encode the requested layer contents to a buffer considering the given image extension More... | |
| DataBuffer | getColorLayerAsCodedBuffer (const std::string &fileExtension, size_t idx=0) const |
| DataBuffer | getDepthLayerAsCodedBuffer (const std::string &fileExtension) const |
| DataBuffer | getPickingLayerAsCodedBuffer (const std::string &fileExtension) const |
| void | copyRepresentationsTo (Image *target) const |
| const DataFormatBase * | getDataFormat () const |
| dvec4 | readPixel (size2_t pos, LayerType layer, size_t index=0) const |
Public Member Functions inherited from inviwo::DataGroup< Image, ImageRepresentation > | |
| const T * | getRepresentation () const |
| T * | getEditableRepresentation () |
| bool | hasRepresentation () const |
| bool | hasRepresentations () const |
| void | clearRepresentations () |
Public Member Functions inherited from inviwo::MetaDataOwner | |
| MetaDataOwner (const MetaDataOwner &rhs)=default | |
| MetaDataOwner & | operator= (const MetaDataOwner &rhs)=default |
| void | copyMetaDataFrom (const MetaDataOwner &src) |
| void | copyMetaDataTo (MetaDataOwner &dst) |
| template<typename T > | |
| T * | createMetaData (const std::string &key) |
| template<typename T , typename U > | |
| void | setMetaData (const std::string &key, U value) |
| template<typename T > | |
| bool | unsetMetaData (const std::string &key) |
| unset, i.e. remove the metadata entry matching the given key and type More... | |
| template<typename T , typename U > | |
| U | getMetaData (const std::string &key, U val) const |
| template<typename T > | |
| T * | getMetaData (const std::string &key) |
| template<typename T > | |
| const T * | getMetaData (const std::string &key) const |
| MetaDataMap * | getMetaDataMap () |
| const MetaDataMap * | getMetaDataMap () const |
| template<typename T > | |
| bool | hasMetaData (const std::string &key) const |
| virtual void | serialize (Serializer &s) const |
| virtual void | deserialize (Deserializer &d) |
Static Public Attributes | |
| static uvec3 | colorCode = uvec3(90, 127, 183) |
| static const std::string | classIdentifier = "org.inviwo.Image" |
| static const std::string | dataName = "Image" |
Static Protected Member Functions | |
| static std::shared_ptr< Layer > | createColorLayer (size2_t dimensions=size2_t(8, 8), const DataFormatBase *format=DataVec4UInt8::get()) |
| static std::shared_ptr< Layer > | createDepthLayer (size2_t dimensions=size2_t(8, 8)) |
| static std::shared_ptr< Layer > | createPickingLayer (size2_t dimensions=size2_t(8, 8), const DataFormatBase *format=DataVec4UInt8::get()) |
Protected Attributes | |
| std::vector< std::shared_ptr< Layer > > | colorLayers_ |
| std::shared_ptr< Layer > | depthLayer_ |
| std::shared_ptr< Layer > | pickingLayer_ |
Protected Attributes inherited from inviwo::DataGroup< Image, ImageRepresentation > | |
| std::mutex | mutex_ |
| std::unordered_map< std::type_index, std::shared_ptr< ImageRepresentation > > | representations_ |
Protected Attributes inherited from inviwo::MetaDataOwner | |
| MetaDataMap | metaData_ |
Additional Inherited Members | |
Protected Member Functions inherited from inviwo::DataGroup< Image, ImageRepresentation > | |
| DataGroup (const DataGroup< Image, ImageRepresentation > &rhs) | |
| DataGroup< Image, ImageRepresentation > & | operator= (const DataGroup< Image, ImageRepresentation > &rhs) |
| void inviwo::Image::copyRepresentationsTo | ( | Image * | target | ) | const |
Copy and resize the representation of this onto the representations of target. Does not change the dimensions of target.
| std::unique_ptr< std::vector< unsigned char > > inviwo::Image::getLayerAsCodedBuffer | ( | LayerType | layerType, |
| const std::string & | fileExtension, | ||
| size_t | idx = 0 |
||
| ) | const |
encode the requested layer contents to a buffer considering the given image extension
| layerType | Indicate which type of layer to return. see LayerType |
| fileExtension | file extension of the requested image format |
| idx | In case of layerType being LayerType::ColorLayer, than return color layer at index idx |
| dvec4 inviwo::Image::readPixel | ( | size2_t | pos, |
| LayerType | layer, | ||
| size_t | index = 0 |
||
| ) | const |
Read a single pixel value out of the specified layer at pos. Should only be used to read single values not entire images.
| void inviwo::Image::setDimensions | ( | size2_t | dimensions | ) |
Resize all representation to dimension. This is destructive, the data will not be preserved. Use copyRepresentationsTo to update the data.