FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
CurveOperation Class Reference
Inheritance diagram for CurveOperation:
FotoSHOCKcore::ImageOperation IFotoSHOCKOperation

Public Member Functions

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, std::vector< UpdateInfo > &ROI, const long stamp)
 Apply the operation. More...
 
virtual QDialog * getUI (QWidget *parent=0)
 Obtain QWidget with user interface for the operation. More...
 
- Public Member Functions inherited from FotoSHOCKcore::ImageOperation
 ImageOperation ()
 A constructor. More...
 
virtual ~ImageOperation ()
 A destructor.
 
GraphNodegetOwnerNode () const
 Get the node containing the operation. More...
 
virtual bool isPrepared ()
 Tell whether the operations is prepared to process image data. More...
 
virtual bool updateROI (UpdateInfo &currentROI, UpdateInfo &parentROI)
 Update ROI in parent to fit the needs of a new ROI. More...
 
boost::shared_ptr< UpdateInforequestROI (boost::shared_ptr< UpdateInfo > currentROI)
 Get the required ROI of an input. More...
 
virtual void serialize (XmlSerializer &serializer)
 Serialize the operation using the specified serializer. More...
 
virtual void deserialize (XmlSerializer &serializer)
 Deserialize the operation using the specified serializer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FotoSHOCKcore::ImageOperation
void setOwnerNode (GraphNode *node)
 Sets the node, that contains the operation. More...
 

Member Function Documentation

QDialog * CurveOperation::getUI ( QWidget *  parent = 0)
virtual

Obtain QWidget with user interface for the operation.

The returned widget will be reparented. That means it will be automatically freed by Qt when closed. Trying to free the the returned QWidget memory manually in the FotoSHOCKOperation desctructor will most likely cause crashes.

Parameters
parentthe parent for the dialog. If the parent is not set in this function the UI may not be shown correctly. The parent must be set in the dialog constructor, otherwise the dialog will not be shown when calling the show() function (Qt bug?). This is important especially for the preview.
Returns
UI for the operation

Implements IFotoSHOCKOperation.

void CurveOperation::initialize ( )
virtual

Set up the internal data which depends on the information from the GraphNode class.

This function is used to set up internal data of an operation, which depends on information that can be obtained only from the GraphNode containing this operation. As an example you can create lookup table which has the same type as the ImageBuffer assigned to the node.

This function is called automatically after the GraphNode containing the operation is fully constructed, including its connections to surround GraphNodes.

The initialize() function is usefull for example when you need to initialize structures depending on number of bands of an image.

Reimplemented from FotoSHOCKcore::ImageOperation.

void CurveOperation::runOperation ( const Inputs sources,
const Outputs dest,
std::vector< UpdateInfo > &  ROI,
const long  stamp 
)
virtual

Apply the operation.

Apply the operation on the given input ImageBuffers and output it in a destination buffer.

The source buffers and destination buffer can be considered as having the same PixelFormat except for some internal GraphManager operations.

Parameters
sourcessource buffers
destdestination buffers
ROIlist of regions where the operation should be recalculated. The specified ROI is not a hard limit, the region recalculated can be bigger than ROI.
stampidentifier which the operation should use to identify itself. That means you should set the tile stamp to this value in the implementation. The stamp can used to check whether the requested region of a buffer has been already processed by the operation to reduce the amount of processed data

Implements FotoSHOCKcore::ImageOperation.


The documentation for this class was generated from the following files: