Salome HOME
Convert to Unix format
[modules/hydro.git] / src / HYDROData / HYDROData_Image.h
index 38e48c19cb16816a1c1a183290b190dbba1b51c1..8b069add8f2f4d5fc2f2263a417163f1221c08ca 100644 (file)
@@ -16,6 +16,18 @@ DEFINE_STANDARD_HANDLE(HYDROData_Image, HYDROData_Object)
  */
 class HYDROData_Image : public HYDROData_Object
 {
+protected:
+  /**
+   * Enumeration of tags corresponding to the persistent object parameters.
+   */
+  enum DataTag
+  {
+    DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
+    DataTag_Operator,    ///< name of the operator that must be executed for image update
+    DataTag_TrsfPoints,  ///< image transformation points (3 input + 3 output)
+    DataTag_FilePath     ///< image imported file path
+  };
+
 public:
   DEFINE_STANDARD_RTTI(HYDROData_Image);
 
@@ -35,6 +47,17 @@ public:
    */
   HYDRODATA_EXPORT QImage Image();
 
+  /**
+   * Stores the image file path
+   * \param theFilePath image file path
+   */
+  HYDRODATA_EXPORT void SetFilePath(const QString& theFilePath);
+
+  /**
+   * Returns uploaded image file path
+   */
+  HYDRODATA_EXPORT QString GetFilePath() const;
+
   /**
    * Stores the image transformation
    * \param theTrsf new transformation
@@ -46,6 +69,38 @@ public:
    */
   HYDRODATA_EXPORT QTransform Trsf();
 
+  /**
+   * Stores the image transformation points (3 input + 3 output)
+   * \param thePointAIn input point A
+   * \param thePointBIn input point B
+   * \param thePointCIn input point C
+   * \param thePointAOut output point A
+   * \param thePointBOut output point B
+   * \param thePointCOut output point C
+   */
+  HYDRODATA_EXPORT void SetTrsfPoints(const QPoint& thePointAIn,
+                                      const QPoint& thePointBIn,
+                                      const QPoint& thePointCIn,
+                                      const QPointF& thePointAOut,
+                                      const QPointF& thePointBOut,
+                                      const QPointF& thePointCOut);
+
+  /**
+   * Returns the image transformation points (3 input + 3 output)
+   * \param thePointAIn input point A
+   * \param thePointBIn input point B
+   * \param thePointCIn input point C
+   * \param thePointAOut output point A
+   * \param thePointBOut output point B
+   * \param thePointCOut output point C
+   */
+  HYDRODATA_EXPORT void TrsfPoints(QPoint& thePointAIn,
+                                   QPoint& thePointBIn,
+                                   QPoint& thePointCIn,
+                                   QPointF& thePointAOut,
+                                   QPointF& thePointBOut,
+                                   QPointF& thePointCOut);
+
   /**
    * Appends reference to other image.
    * \param theReferenced the image referenced by this
@@ -85,6 +140,42 @@ public:
    */
   HYDRODATA_EXPORT void ClearReferences();
 
+  /**
+   * Stores the operator name
+   * \param theOpName name of the operator that must be executed for image update
+   */
+  HYDRODATA_EXPORT void SetOperatorName(const QString theOpName);
+
+  /**
+   * Returns the operator name
+   * \returns the name of the operator that must be executed for image update
+   */
+  HYDRODATA_EXPORT QString OperatorName();
+
+  /**
+   * Stores the operator arguments
+   * \param theArgs array that stores the operator arguments, needed for execution
+   */
+  HYDRODATA_EXPORT void SetArgs(const QByteArray& theArgs);
+
+  /**
+   * Returns the operator arguments
+   * \returns array that stores the operator arguments, needed for execution
+   */
+  HYDRODATA_EXPORT QByteArray Args();
+  
+  /**
+   * Sets the "MustBeUpdated" flag: if image is depended on updated features.
+   * \param theFlag is true for images that must be updated, false for up-to-date
+   */
+  HYDRODATA_EXPORT void MustBeUpdated(bool theFlag);
+
+  /**
+   * Returns the "MustBeUpdated" flag: is image must be recomputed or not
+   * \returns false if image is up to date
+   */
+  HYDRODATA_EXPORT bool MustBeUpdated();
+
 protected:
 
   friend class HYDROData_Iterator;