MorphoGraphX
|
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 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 BoundingBox3i & | changedBBox () 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 Stack * | stack () 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 QString & | file () 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 |
The Store class holds the actual 3D data and properties specific to it.
void mgx::Store::allocate | ( | ) |
Makes sure the memory for the store is allocated.
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.
|
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)
|
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)
|
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.