34#ifndef ANA_VOLUME_VOLUME_H
35#define ANA_VOLUME_VOLUME_H
39#include <cartodata/volume/volume.h>
40#include <aims/rgb/rgb.h>
69 AVolume(
const std::string & filename =
"" );
75 float MinT()
const {
return 0.0; }
76 float MaxT()
const {
return float(_volume->getSizeT()-1); }
79 std::vector<float> & bmax )
const;
81 std::vector<float> & bmax )
const;
89 T &
operator () (
size_t x=0,
size_t y=0,
size_t z=0,
size_t t=0 )
90 {
return (*_volume)( x, y , z ,t ); }
93 {
return (*_volume)( x, y , z ,t ); }
98 unsigned tex = 0 )
const;
111 virtual AObject*
objectAt(
const std::vector<float> & pos,
float tol = 0 );
116 int poly = -1 )
const;
117 virtual std::vector<float>
118 texValues(
const std::vector<float> & pos,
int poly = -1 )
const;
124 virtual bool savable()
const {
return(
true ); }
125 virtual bool reload(
const std::string & filename );
126 virtual bool save(
const std::string & filename );
137 const std::vector<float> & time,
142 const std::vector<float> & time )
const;
145 const std::vector<float> & time )
const;
148 const std::vector<float> & time )
const;
Base Anatomist object (abstract)
virtual void internalUpdate()
Updates the state of the object.
virtual void setShaderParameters(const Shader &shader, const ViewState &state) const
virtual AObject * clone(bool shallow=true)
Makes a copy of the object, with a duplicated object structure, palette and material,...
bool textured2D() const
true if 2D rendering uses a textured plane (not a full openGL object)
bool Is3DObject()
Can be display in 3D windows.
virtual float mixedTexValue(const std::vector< float > &pos, int poly=-1) const
Same as above except that coordinates are not transformed but taken in object coordinates system.
virtual unsigned dimTexture() const
Number of texture values for a point.
bool Is2DObject()
Can be display in 2D windows.
void updateSagittal(AImage *ximage, const Point3df &p0, const std::vector< float > &time) const
Optimized texture filling routine (no transformation)
virtual bool isTransparent() const
float GetValue(Point3df pos, float time, Referential *winref, Geometry *wingeom)
Retourne la valeur d'un voxel du volume.
AVolume(carto::rc_ptr< carto::Volume< T > >)
void adjustPalette()
Creates or updates object palette according to object values (if needed)
float MaxT() const
Obsolete, deprecated.
virtual carto::GenericObject * attributed()
virtual void setInternalsChanged()
Notifies some underlying lower-level objects have changed.
const carto::rc_ptr< carto::Volume< T > > volume() const
virtual const carto::GenericObject * attributed() const
virtual void setVolume(carto::rc_ptr< carto::Volume< T > > vol)
virtual bool hasTexture() const
Textured objects have values associated with a geometric coordinate.
void updateSlice(AImage &image, const Point3df &p0, const std::vector< float > &time, const Transformation *tra, const Point3df &inc, const Point3df &offset, const Geometry *wingeom) const
Generic texture filling routine for any transformation.
virtual std::string objectFullTypeName(void) const
Get Object Full Type Name.
virtual bool reload(const std::string &filename)
Re-reads objects from disk.
void updateAxial(AImage *ximage, const Point3df &p0, const std::vector< float > &time) const
Optimized texture filling routine (no transformation)
virtual bool printTalairachCoord(const Point3df &pos, const Referential *) const
should be replaced by a real referential
virtual bool boundingBox2D(std::vector< float > &bmin, std::vector< float > &bmax) const
Bounding box in 2D views mode.
float MinT() const
Obsolete, deprecated.
AVolume(const std::string &filename="")
virtual std::vector< float > texValues(const std::vector< float > &pos, int poly=-1) const
void SetExtrema()
Scans the object internals and determines its (texture) extrema values.
virtual AObject * objectAt(const std::vector< float > &pos, float tol=0)
Not selectable: always returns Null.
virtual bool savable() const
carto::rc_ptr< carto::Volume< T > > volume()
void updateCoronal(AImage *ximage, const Point3df &p0, const std::vector< float > &time) const
Optimized texture filling routine (no transformation)
T & operator()(size_t x=0, size_t y=0, size_t z=0, size_t t=0)
virtual bool update2DTexture(AImage &, const Point3df &posbase, const SliceViewState &, unsigned tex=0) const
new API
virtual std::vector< float > voxelSize() const
Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1)
virtual bool loadable() const
virtual void setVoxelSize(const std::vector< float > &vs)
virtual bool save(const std::string &filename)
virtual bool boundingBox(std::vector< float > &bmin, std::vector< float > &bmax) const
Fills bmin and bmax with the N-D bounding box extrema in the object's referential coordinates.
Referential: marker for transformations, with an associated color.
Specialization for a sliceable object.
ViewState holds information about how a view wants to see an object.
AimsVector< float, 3 > Point3df