Load a new image. More...
#include <RootCreateImage.hpp>
Public Member Functions | |
RootCreateImage (FotoSHOCKcore::PixelData format, unsigned int width, unsigned int height, const std::string color) | |
void | prepare (FotoSHOCKcore::PixelData format, unsigned int width, unsigned int height, const std::string color) |
virtual const char * | name () |
Name of the operation. More... | |
virtual const char * | description () |
Description of the operation. More... | |
virtual ImageOperation * | operation () |
Create a new ImageOperation object. More... | |
virtual InputProto | inputPrototype () |
Description of inputs. More... | |
virtual ImageOperationType | operationType () |
Return a type of the ImageOperation. More... | |
virtual OutputProto | outputPrototype () |
Description of outputs. More... | |
virtual void | runOperation (const Inputs &sources, const Outputs &dest, vector< UpdateInfo > &ROI, const long int stamp) |
virtual bool | isPrepared () |
Tell whether the operations is prepared to process image data. More... | |
virtual void | serialize (XmlSerializer &serializer) |
Serialize the operation using the specified serializer. More... | |
Public Member Functions inherited from FotoSHOCKcore::ImageOperationDescriptor | |
ImageOperationDescriptor () | |
Default constructor. | |
virtual | ~ImageOperationDescriptor () |
A destructor. | |
uint64_t | id () |
Unique identifier of the operation descriptor. More... | |
Public Member Functions inherited from FotoSHOCKcore::ImageOperation | |
ImageOperation () | |
A constructor. More... | |
virtual | ~ImageOperation () |
A destructor. | |
GraphNode * | getOwnerNode () const |
Get the node containing the operation. More... | |
virtual void | initialize () |
Set up the internal data which depends on the information from the GraphNode class. More... | |
virtual void | runOperation (const Inputs &sources, const Outputs &dest, vector< UpdateInfo > &ROI, const long stamp)=0 |
Apply the operation. More... | |
virtual bool | updateROI (UpdateInfo ¤tROI, UpdateInfo &parentROI) |
Update ROI in parent to fit the needs of a new ROI. More... | |
boost::shared_ptr< UpdateInfo > | requestROI (boost::shared_ptr< UpdateInfo > currentROI) |
Get the required ROI of an input. More... | |
virtual void | deserialize (XmlSerializer &serializer) |
Deserialize the operation using the specified serializer. More... | |
Additional Inherited Members | |
Public Types inherited from FotoSHOCKcore::ImageOperationDescriptor | |
enum | ImageOperationType { TypeNone, TypeRoot, TypeNorm, TypePreview, TypeConvertFormat } |
Possible types of ImageOperation s. More... | |
Protected Member Functions inherited from FotoSHOCKcore::ImageOperation | |
void | setOwnerNode (GraphNode *node) |
Sets the node, that contains the operation. More... | |
Load a new image.
Loads an image.
The format used is the same as the format of the input image.
fileName | path to the image |
|
inlinevirtual |
Description of the operation.
Implements FotoSHOCKcore::ImageOperationDescriptor.
|
inlinevirtual |
Description of inputs.
Describes inputs of the operation. This includes PixelData format, that is accepted by each input.
The default implementation returns prototype specifying one input, that accepts any kind of ValueType, with arbitrary bit depth and arbitrary color space.
Reimplemented from FotoSHOCKcore::ImageOperationDescriptor.
|
virtual |
Tell whether the operations is prepared to process image data.
The isPrepared() function is used to check whether all preconditions needed by the ImageOperation to work. These preconditions includes eg. initial setup from a user interface. This does not include setup done by the initialize() function.
The default implementation always returns true, ie. the ImageOperation is prepared to process image data without needing any additional setup.
Reimplemented from FotoSHOCKcore::ImageOperation.
|
inlinevirtual |
Name of the operation.
The name of operation will be shown in a graph.
Implements FotoSHOCKcore::ImageOperationDescriptor.
|
virtual |
Create a new ImageOperation object.
This function is used to obtain a new instance of the associated ImageOperation. The object must be allocated on heap using new. The memory is freed automatically when the object is not needed anymore.
Implements FotoSHOCKcore::ImageOperationDescriptor.
|
inlinevirtual |
Return a type of the ImageOperation.
By default ImageOperationType::TypeNorm is returned. If the operation is one of the special operations the getImageOperationType() must be overloaded appropriately.
Reimplemented from FotoSHOCKcore::ImageOperationDescriptor.
|
inlinevirtual |
Description of outputs.
Describes outputs of the operation.This includes PixelData format, that is provided by each input.
The default implementation returns prototype specifying one output, that has the same format as the input.
NOTE: Currently only one output is supported
Reimplemented from FotoSHOCKcore::ImageOperationDescriptor.
|
virtual |
Serialize the operation using the specified serializer.
Implement this function when the operation has custom settings that should be saved in the project. The operation must use the serializer that is passed as a parameter to seriaze its data, as it guarantees, that the data are stored at a proper place in the project file.
If the operation implements this function, it must implement its counterpart, the deserialize() function.
serializer | reference to OperationSerializer that is used for serializing data |
Reimplemented from FotoSHOCKcore::ImageOperation.