1 #ifndef HYDROData_Image_HeaderFile
2 #define HYDROData_Image_HeaderFile
4 #include <HYDROData_Object.h>
9 DEFINE_STANDARD_HANDLE(HYDROData_Image, HYDROData_Object)
11 /**\class HYDROData_Image
12 * \brief Class that stores/retreives information about the image.
14 * Keeps image as binary array, transformation and other properties
15 * of image with correspondent API for forkind wit hthese properties.
17 class HYDROData_Image : public HYDROData_Object
20 DEFINE_STANDARD_RTTI(HYDROData_Image);
23 * Returns the kind of this object. Must be redefined in all objects of known type.
25 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_IMAGE;}
29 * \param theImage new image
31 HYDRODATA_EXPORT void SetImage(const QImage& theImage);
34 * Returns the kept image
36 HYDRODATA_EXPORT QImage Image();
39 * Stores the image transformation
40 * \param theTrsf new transformation
42 HYDRODATA_EXPORT void SetTrsf(const QTransform& theTrsf);
45 * Returns the kept transformation, or "identity" if not yet stored
47 HYDRODATA_EXPORT QTransform Trsf();
50 * Appends reference to other image.
51 * \param theReferenced the image referenced by this
53 HYDRODATA_EXPORT void AppendReference(Handle(HYDROData_Image) theReferenced);
56 * Returns the number of referenced images
57 * \return zero if there is no references
59 HYDRODATA_EXPORT int NbReferences();
62 * Returns reference by index.
63 * \param theIndex number of reference [0; NbReference)
64 * \returns the referenced image, or Null if index is invalid
66 HYDRODATA_EXPORT Handle(HYDROData_Image) Reference(const int theIndex) const;
69 * Updates reference by index. If index is one-bigger than \a NbReferences,
70 * this method appends it to the end (NbReferences is incremented).
71 * \param theIndex number of reference [0; NbReference]
72 * \param theReferenced the image referenced by this
74 HYDRODATA_EXPORT void ChangeReference(
75 const int theIndex, Handle(HYDROData_Image) theReferenced);
78 * Removes reference by index
79 * \param theIndex number of reference [0; NbReference)
81 HYDRODATA_EXPORT void RemoveReference(const int theIndex);
84 * Removes all references.
86 HYDRODATA_EXPORT void ClearReferences();
90 friend class HYDROData_Iterator;
93 * Creates new object in the internal data structure. Use higher level objects
94 * to create objects with real content.
99 * Destructs properties of the object and object itself, removes it from the document.