Salome HOME
debug of automatic tests
[modules/hydro.git] / src / HYDROData / HYDROData_Image.h
index 05bb766633c6704ee995ded5222ad0f969358f16..31e5b691b8199265d1d2ce49934dd6d04a901768 100644 (file)
@@ -1,8 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
+// Copyright (C) 2014-2015  EDF-R&D
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
 
 #include <HYDROData_Entity.h>
 
+#ifdef WIN32
+  #pragma warning ( disable: 4251 )
+#endif
+
 #include <QImage>
 #include <QTransform>
 
-DEFINE_STANDARD_HANDLE(HYDROData_Image, HYDROData_Entity)
+#ifdef WIN32
+  #pragma warning ( default: 4251 )
+#endif
 
 /**\class HYDROData_Image
  * \brief Class that stores/retreives information about the image.
@@ -49,6 +51,25 @@ public:
     ReferenceImage
   };
 
+  enum ECW_CellUnits
+  {
+    ECW_CellUnits_Meters = 1,
+    ECW_CellUnits_Deg = 2,
+    ECW_CellUnits_Feet = 3,
+    ECW_CellUnits_Unknown = -1
+  };
+
+  struct ECW_FileInfo
+  {
+    ECW_CellUnits myCellSizeUnits;
+    double myCellIncrementX;
+    double myCellIncrementY;
+    double myOriginX;
+    double myOriginY;
+    int myXSize;
+    int myYSize;
+  };
+
 protected:
   /**
    * Enumeration of tags corresponding to the persistent object parameters.
@@ -64,7 +85,7 @@ protected:
   };
 
 public:
-  DEFINE_STANDARD_RTTI(HYDROData_Image);
+  DEFINE_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity);
 
   /**
    * Returns the kind of this object. Must be redefined in all objects of known type.
@@ -74,7 +95,8 @@ public:
   /**
    * Dump Image object to Python script representation.
    */
-  HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
+  HYDRODATA_EXPORT virtual QStringList DumpToPython( const QString& thePyScriptPath,
+                                                     MapOfTreatedObjects& theTreatedObjects ) const;
 
   /**
    * Updates object state.
@@ -114,6 +136,15 @@ public:
    */
   HYDRODATA_EXPORT bool LoadImage(const QString& theFilePath);
 
+  /**
+   * Load the ECW image from file
+   * \param theFilePath path to image
+   */
+  HYDRODATA_EXPORT bool LoadImageECW( const QString& theFilePath );
+
+
+  HYDRODATA_EXPORT static bool OpenECW(char* theFileName, QImage& theImage, ECW_FileInfo* theECWInfo);
+
   /**
    * Returns the kept image
    */
@@ -358,16 +389,16 @@ public:
   
 
   /**
-   * Marks the image as self-splitted.
-   * \param theFlag is true for self-splitted image
+   * Marks the image as self-split.
+   * \param theFlag is true for self-plit image
    */
-  HYDRODATA_EXPORT void SetIsSelfSplitted(bool theFlag);
+  HYDRODATA_EXPORT void SetIsSelfSplit(bool theFlag);
 
   /**
-   * Checks that the image is self-splitted.
-   * \returns true if image is self-splitted
+   * Checks that the image is self-split.
+   * \returns true if image is self-split
    */
-  HYDRODATA_EXPORT bool IsSelfSplitted() const;
+  HYDRODATA_EXPORT bool IsSelfSplit() const;
 
 private: