imagedata.h 2.16 KB
Newer Older
schultezub's avatar
schultezub committed
1
2
#ifndef IMAGEDATA_H__
#define IMAGEDATA_H__
schultezub's avatar
schultezub committed
3

schultezub's avatar
schultezub committed
4
5
#include "core/datastructures/abstractdata.h"
#include "core/datastructures/imagemappinginformation.h"
schultezub's avatar
schultezub committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "tgt/vector.h"

namespace TUMVis {

    /**
     * Stores basic information about one (semantic) image of arbitrary dimension.
     * Different representations (e.g. local memory, OpenGL texture, OpenCL buffer) are
     * to be defined by inheritance.
     * 
     * \todo 
     */
    class ImageData : public AbstractData {
    public:
        ImageData(size_t dimensionality, const tgt::svec3& size);

        virtual ~ImageData();

        /**
         * Dimensionality of this image.
         * \return _dimensionality
         */
        size_t getDimensionality() const;

        /**
         * Size of this image (number of elements per dimension).
         * \return _size
         */
        const tgt::svec3& getSize() const;

        /**
         * Mapping information of this image
         * \return _mappingInformation
         */
        const ImageMappingInformation& getMappingInformation() const;

        /**
         * Mapping information of this image
         * \return _mappingInformation
         */
        ImageMappingInformation& getMappingInformation();

        /**
         * Returns the subimage of this image given by \a llf and \a urb.
         * TODO: Check whether it is necessary to adjust image mapping!
         *
         * \param   llf     Lower-Left-Front coordinates of subimage
         * \param   urb     Upper-Right-Back coordinates of subimage
         * \return  An image containing the subimage of this with the given coordinates.
         */
schultezub's avatar
schultezub committed
55
        virtual ImageData* getSubImage(const tgt::svec3& llf, const tgt::svec3& urb) const = 0;
schultezub's avatar
schultezub committed
56

schultezub's avatar
schultezub committed
57
    protected:
schultezub's avatar
schultezub committed
58
59
60
61
62
63
64
65
66
        size_t _dimensionality;                         ///< Dimensionality of this image
        tgt::svec3 _size;                               ///< Size of this image (number of elements per dimension)
        ImageMappingInformation _mappingInformation;    ///< Mapping information of this image

        static const std::string loggerCat_;
    };

}

schultezub's avatar
schultezub committed
67
#endif // IMAGEDATA_H__