OpenWalnut
1.5.0dev
|
Base class for all data set types. More...
#include <WDataSet.h>
Public Types | |
typedef std::shared_ptr< WDataSet > | SPtr |
Shared pointer abbreviation to a instance of this class. More... | |
typedef std::shared_ptr< const WDataSet > | ConstSPtr |
Shared pointer abbreviation to a const instance of this class. More... | |
Public Member Functions | |
WDataSet () | |
This constructor should be used if a dataSet does not stem from a file. More... | |
virtual | ~WDataSet () |
Since WDataSet is a base class and thus should be polymorphic we add virtual destructor. More... | |
void | setFilename (const std::string filename) |
Set the name of the file that this data set stems from. More... | |
std::string | getFilename () const |
Get the name of the file that this data set stems from. More... | |
OW_API_DEPRECATED void | setFileName (const std::string filename) |
Set the name of the file that this data set stems from. More... | |
OW_API_DEPRECATED std::string | getFileName () const |
Get the name of the file that this data set stems from. More... | |
virtual bool | isTexture () const |
Determines whether this dataset can be used as a texture. More... | |
virtual std::shared_ptr< WDataSetVector > | isVectorDataSet () |
Checks if this dataset is a vector dataset. More... | |
virtual osg::ref_ptr< WDataTexture3D > | getTexture () const |
Returns the texture- representation of the dataset. More... | |
virtual const std::string | getName () const |
Gets the name of this prototype. More... | |
virtual const std::string | getDescription () const |
Gets the description for this prototype. More... | |
std::shared_ptr< WProperties > | getProperties () const |
Return a pointer to the properties object of the dataset. More... | |
std::shared_ptr< WProperties > | getInformationProperties () const |
Return a pointer to the information properties object of the dataset. More... | |
Public Member Functions inherited from WTransferable | |
WTransferable () | |
Default constructor. More... | |
virtual | ~WTransferable () |
Destructor. More... | |
Public Member Functions inherited from WPrototyped | |
WPrototyped () | |
Default constructor. More... | |
virtual | ~WPrototyped () |
Destructor. More... | |
template<typename T > | |
bool | isA () |
Checks whether the actual prototype has the specified runtime type. More... | |
Static Public Member Functions | |
static std::shared_ptr< WPrototyped > | getPrototype () |
Returns a prototype instantiated with the true type of the deriving class. More... | |
Protected Attributes | |
std::shared_ptr< WProperties > | m_properties |
The property object for the dataset. More... | |
std::shared_ptr< WProperties > | m_infoProperties |
The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION". More... | |
Static Protected Attributes | |
static std::shared_ptr< WPrototyped > | m_prototype = std::shared_ptr< WPrototyped >() |
The prototype as singleton. More... | |
Private Attributes | |
std::string | m_filename |
Name of the file this data set was loaded from. More... | |
Base class for all data set types.
This class has a number of subclasses specifying the different types of data sets. Two of the dataset types represent single and time-dependent datasets (compound of several time steps) respectively.
Definition at line 49 of file WDataSet.h.
typedef std::shared_ptr< const WDataSet > WDataSet::ConstSPtr |
Shared pointer abbreviation to a const instance of this class.
Definition at line 60 of file WDataSet.h.
typedef std::shared_ptr< WDataSet > WDataSet::SPtr |
Shared pointer abbreviation to a instance of this class.
Definition at line 55 of file WDataSet.h.
WDataSet::WDataSet | ( | ) |
This constructor should be used if a dataSet does not stem from a file.
It presets the correpsonding filename as empty string.
Definition at line 39 of file WDataSet.cpp.
References m_infoProperties.
Referenced by getPrototype().
|
inlinevirtual |
Since WDataSet is a base class and thus should be polymorphic we add virtual destructor.
Definition at line 72 of file WDataSet.h.
|
virtual |
Gets the description for this prototype.
Implements WPrototyped.
Reimplemented in WRecording, WEEG2, WEEG, WDataSetTimeSeries, WDataSetSphericalHarmonics, WDataSetSingle, WDataSetSegmentation, WDataSetScalar, WDataSetRawHARDI, WDataSetPoints, WDataSetHistogram1D, WDataSetHierarchicalClustering, WDataSetFiberVector, WDataSetFibers, and WDataSetDTI.
Definition at line 84 of file WDataSet.cpp.
std::string WDataSet::getFilename | ( | ) | const |
Get the name of the file that this data set stems from.
Definition at line 64 of file WDataSet.cpp.
References m_filename.
Referenced by getFileName().
std::string WDataSet::getFileName | ( | ) | const |
Get the name of the file that this data set stems from.
Definition at line 53 of file WDataSet.cpp.
References getFilename().
std::shared_ptr< WProperties > WDataSet::getInformationProperties | ( | ) | const |
Return a pointer to the information properties object of the dataset.
The dataset intends these properties to not be modified.
Definition at line 109 of file WDataSet.cpp.
References m_infoProperties.
|
virtual |
Gets the name of this prototype.
Implements WPrototyped.
Reimplemented in WRecording, WEEG2, WEEG, WDataSetTimeSeries, WDataSetSphericalHarmonics, WDataSetSingle, WDataSetSegmentation, WDataSetScalar, WDataSetRawHARDI, WDataSetPoints, WDataSetHistogram1D, WDataSetHierarchicalClustering, WDataSetFiberVector, WDataSetFibers, and WDataSetDTI.
Definition at line 79 of file WDataSet.cpp.
std::shared_ptr< WProperties > WDataSet::getProperties | ( | ) | const |
Return a pointer to the properties object of the dataset.
Add all the modifiable settings here. This allows the user to modify several properties of a dataset.
Definition at line 104 of file WDataSet.cpp.
References m_properties.
|
static |
Returns a prototype instantiated with the true type of the deriving class.
Definition at line 89 of file WDataSet.cpp.
References m_prototype, and WDataSet().
|
virtual |
Returns the texture- representation of the dataset.
May throw an exception if no texture is available.
Reimplemented in WDataSetSingle.
Definition at line 74 of file WDataSet.cpp.
|
virtual |
Determines whether this dataset can be used as a texture.
Reimplemented in WEEG, WDataSetVector, WDataSetSphericalHarmonics, WDataSetSingle, WDataSetPoints, WDataSetFiberVector, and WDataSetFibers.
Definition at line 69 of file WDataSet.cpp.
|
virtual |
Checks if this dataset is a vector dataset.
Reimplemented in WDataSetVector.
Definition at line 99 of file WDataSet.cpp.
void WDataSet::setFilename | ( | const std::string | filename | ) |
Set the name of the file that this data set stems from.
filename | the string representing the name |
Definition at line 58 of file WDataSet.cpp.
References m_filename.
Referenced by setFileName(), WDataSetFiberVector::WDataSetFiberVector(), and WEEG2::WEEG2().
void WDataSet::setFileName | ( | const std::string | filename | ) |
Set the name of the file that this data set stems from.
filename | the string representing the name |
Definition at line 48 of file WDataSet.cpp.
References setFilename().
|
private |
Name of the file this data set was loaded from.
This information may allow hollowing data sets later. DataSets that were not loaded from a file should have the empty string stored here.
Definition at line 189 of file WDataSet.h.
Referenced by getFilename(), and setFilename().
|
protected |
The property object for the dataset containing only props whose purpose is "PV_PURPOSE_INFORMNATION".
It is useful to define some property to only be of informational nature. The GUI does not modify them. As it is a WProperties instance, you can use it the same way as m_properties.
Definition at line 181 of file WDataSet.h.
Referenced by getInformationProperties(), WDataSetFibers::init(), WDataSet(), WDataSetSingle::WDataSetSingle(), and WEEG2::WEEG2().
|
protected |
The property object for the dataset.
Definition at line 174 of file WDataSet.h.
Referenced by getProperties(), and WDataSetFibers::init().
|
staticprotected |
The prototype as singleton.
Definition at line 169 of file WDataSet.h.
Referenced by getPrototype().