volmetrics

diff src/volume.h @ 6:e6485ef45e6e

visualize volume
author Eleni Maria Stea <elene.mst@gmail.com>
date Sat, 18 Jan 2014 01:57:52 +0200
parents 92c163c939be
children 928954bfefd7
line diff
     1.1 --- a/src/volume.h	Fri Jan 17 23:45:56 2014 +0200
     1.2 +++ b/src/volume.h	Sat Jan 18 01:57:52 2014 +0200
     1.3 @@ -7,15 +7,30 @@
     1.4  class Volume {
     1.5  private:
     1.6  	std::vector<Image> slices;
     1.7 +
     1.8  	int width;
     1.9  	int height;
    1.10  	float zaspect;
    1.11  
    1.12 +	unsigned int vol_tex;
    1.13 +	mutable bool vol_tex_valid;
    1.14 +
    1.15 +	void create_vol_tex() const;
    1.16 +
    1.17  public:
    1.18  	Volume();
    1.19 +	~Volume();
    1.20  
    1.21 -	bool load_volume(const char *fname);
    1.22 +	bool load(const char *fname);
    1.23 +
    1.24  	bool push_slice(Image &&slice);
    1.25 +	const Image *get_slice(int num_slice) const;
    1.26 +	const Image *get_slice_by_z(float z) const;
    1.27 +	int get_slice_count() const;
    1.28 +
    1.29 +	int get_slice_idx_by_z(float z) const;
    1.30 +
    1.31 +	unsigned int get_texture() const;
    1.32  
    1.33  	void draw();
    1.34  };