MorphoGraphX
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
mgx::Store Class Reference

The Store class holds the actual 3D data and properties specific to it. More...

#include <Store.hpp>

Public Member Functions

 Store (Stack *stack)
 Create an empty store.
 
 Store (const Store &copy)
 Copy the store, and attach it to the same stack.
 
 ~Store ()
 Delete the data attached to the store.
 
HVecUS & data ()
 Actual 3D data store linearly in a host vector. More...
 
const HVecUS & data () const
 Actual 3D data store linearly in a host vector. More...
 
bool labels () const
 Returns true if the data is to be interpreted as labels rather than intensities.
 
void setLabels (bool val)
 Change the interpretation of the volume as labels.
 
float opacity () const
 Opacity used to render the volume.
 
void setOpacity (float f)
 Changed the opacity of the volume.
 
float brightness () const
 Global brightness used to render the volume.
 
void setBrightness (float f)
 Change the brightness of the volume.
 
TransferFunction transferFct () const
 Retrieve the transfer function used to render the volume.
 
void setTransferFct (const TransferFunction &f)
 Change the transfer function used to render the volume.
 
bool transferFunctionChanged () const
 Returns true if the transfer function has been changed within this process.
 
void changed ()
 A process that changes the 3D data needs to call this method. More...
 
void changed (const BoundingBox3i &bbox)
 A process that changed a range in the 3D data needs to call this method. More...
 
bool wasChanged () const
 Returns true if the 3D data has been changed during this process.
 
const BoundingBox3ichangedBBox () const
 Returns the current bounding box for the changes.
 
void show ()
 Ask the user interface to show this store.
 
void hide ()
 Ask the user interface to hide this store.
 
bool isVisible () const
 Is the store currently visible.
 
const Stackstack () const
 Returns a constant pointer on the stack holding this store.
 
void setStack (Stack *s)
 Change the stack this store is attached to.
 
void allocate ()
 Makes sure the memory for the store is allocated. More...
 
void reset ()
 Reset the memory of the store. More...
 
const QStringfile () const
 Returns the file corresponding to this store.
 
void setFile (const QString &f=QString())
 Set which file corresponds to this store.
 
uint size () const
 Returns the size (in number of elements) of the store.
 
bool empty () const
 True if the store is of size 0.
 
void copyMetaData (const Store *other)
 Copy the metadata from another store. More...
 

Protected Member Functions

void resetModified ()
 

Protected Attributes

HVecUS _data
 
bool _label
 
bool changed_function
 
float _opacity
 
float _brightness
 
BoundingBox3i _changed
 
TransferFunction _fct
 
bool _isVisible
 
QString _filename
 
const Stack_stack
 

Friends

class process::SetupProcess
 

Detailed Description

The Store class holds the actual 3D data and properties specific to it.

Member Function Documentation

void mgx::Store::allocate ( )

Makes sure the memory for the store is allocated.

Note
before the process starts, the memory is already allocated. It is useful only if you change the size of the data by hand.
void mgx::Store::changed ( )

A process that changes the 3D data needs to call this method.

This indicate the GUI that the data changed and need reloading in the graphics card.

void mgx::Store::changed ( const BoundingBox3i bbox)
inline

A process that changed a range in the 3D data needs to call this method.

This indicate the GUI that the data changed in this range and need reloading. Note that many calls to this will assume the union of the bounding boxes have changed.

void mgx::Store::copyMetaData ( const Store other)

Copy the metadata from another store.

In the end, the states will be the same (currently only labels and file name)

HVecUS& mgx::Store::data ( )
inline

Actual 3D data store linearly in a host vector.

The data is always store as an unsigned 16 bits integer in a host vector (i.e. from the thrust library)

const HVecUS& mgx::Store::data ( ) const
inline

Actual 3D data store linearly in a host vector.

The data is always store as an unsigned 16 bits integer in a host vector (i.e. from the thrust library)

void mgx::Store::reset ( )

Reset the memory of the store.

In the end, the store has the correct size and is filled with zeros.


The documentation for this class was generated from the following file: