eleni@0: #ifndef VOLUME_H_ eleni@0: #define VOLUME_H_ eleni@0: elene@3: #include elene@3: #include "image.h" elene@3: eleni@1: class Volume { eleni@1: private: elene@3: std::vector slices; elene@6: elene@4: int width; elene@4: int height; elene@5: float zaspect; eleni@1: elene@6: unsigned int vol_tex; elene@6: mutable bool vol_tex_valid; elene@6: elene@6: void create_vol_tex() const; elene@6: elene@3: public: elene@3: Volume(); elene@6: ~Volume(); elene@3: elene@6: bool load(const char *fname); elene@6: elene@4: bool push_slice(Image &&slice); elene@6: const Image *get_slice(int num_slice) const; elene@6: const Image *get_slice_by_z(float z) const; elene@6: int get_slice_count() const; elene@6: elene@6: int get_slice_idx_by_z(float z) const; elene@6: elene@6: unsigned int get_texture() const; elene@3: elene@8: void draw() const; eleni@1: }; eleni@1: eleni@0: #endif // VOLUME_H_