Data package containing structure by cell connectivity and data Conglomerate of data grid and several data channels assigned to grid dimensions.
More...
#include <dataset.h>
|
| DataSet (const std::shared_ptr< const Connectivity > grid) |
|
| DataSet (GridPrimitive size, std::vector< ind > &numCellsPerDim) |
|
| DataSet (const DataSet ©)=default |
|
template<typename G > |
const std::shared_ptr< const G > | getGrid () const |
|
template<typename G > |
std::shared_ptr< G > | getGrid () |
|
std::shared_ptr< Channel > | addChannel (Channel *channel) |
|
void | addChannel (std::shared_ptr< const Channel > channel) |
|
std::shared_ptr< const Channel > | getFirstChannel () const |
|
template<typename T , ind N> |
std::shared_ptr< const DataChannel< T, N > > | getFirstChannel () const |
|
std::shared_ptr< const Channel > | getChannel (const std::string &name, GridPrimitive definedOn=GridPrimitive::Vertex) const |
|
std::shared_ptr< const Channel > | getChannel (std::pair< std::string, GridPrimitive > &key) const |
|
template<typename T , ind N> |
std::shared_ptr< const DataChannel< T, N > > | getChannel (const std::string &name, GridPrimitive definedOn=GridPrimitive::Vertex) const |
|
template<typename T , ind N> |
std::shared_ptr< const BufferChannel< T, N > > | getAsBuffer (const std::string &name, GridPrimitive definedOn=GridPrimitive::Vertex) const |
|
bool | removeChannel (std::shared_ptr< const Channel > channel) |
|
ind | getNumChannels () const |
|
std::vector< std::pair< std::string, GridPrimitive > > | getChannelNames () const |
|
DataChannelMap::const_iterator | cbegin () const |
|
DataChannelMap::const_iterator | cend () const |
|
Data package containing structure by cell connectivity and data Conglomerate of data grid and several data channels assigned to grid dimensions.
- Author
- Anke Friederici and Tino Weinkauf
◆ DataSet()
inviwo::discretedata::DataSet::DataSet |
( |
const DataSet & |
copy | ) |
|
|
default |
◆ addChannel() [1/2]
std::shared_ptr< Channel > inviwo::discretedata::DataSet::addChannel |
( |
Channel * |
channel | ) |
|
Add a new channel to the set
- Parameters
-
channel | Pointer to data, takes memory ownership |
- Returns
- Shared pointer for further handling
◆ addChannel() [2/2]
void inviwo::discretedata::DataSet::addChannel |
( |
std::shared_ptr< const Channel > |
channel | ) |
|
Add a new channel to the set
- Parameters
-
channel | Shared pointer to data, remains valid |
◆ getAsBuffer()
template<typename T , ind N>
std::shared_ptr< const BufferChannel< T, N > > inviwo::discretedata::DataSet::getAsBuffer |
( |
const std::string & |
name, |
|
|
GridPrimitive |
definedOn = GridPrimitive::Vertex |
|
) |
| const |
Returns the specified buffer, converts to buffer or copies
- Parameters
-
name | Unique name of requested buffer |
definedOn | GridPrimitive type the channel is defined on, default 0D vertices |
◆ getChannel() [1/3]
std::shared_ptr< const Channel > inviwo::discretedata::DataSet::getChannel |
( |
const std::string & |
name, |
|
|
GridPrimitive |
definedOn = GridPrimitive::Vertex |
|
) |
| const |
Returns the specified channel, returns first instance found
- Parameters
-
name | Unique name of requested channel |
definedOn | GridPrimitive type the channel is defined on, default 0D vertices |
◆ getChannel() [2/3]
std::shared_ptr< const Channel > inviwo::discretedata::DataSet::getChannel |
( |
std::pair< std::string, GridPrimitive > & |
key | ) |
const |
Returns the specified channel if it is in the desired format, returns first instance found
- Parameters
-
key | Unique name and GridPrimitive type the channel is defined on |
◆ getChannel() [3/3]
template<typename T , ind N>
std::shared_ptr< const DataChannel< T, N > > inviwo::discretedata::DataSet::getChannel |
( |
const std::string & |
name, |
|
|
GridPrimitive |
definedOn = GridPrimitive::Vertex |
|
) |
| const |
Returns the specified channel if it is in the desired format, returns first instance found
- Parameters
-
name | Unique name of requested channel |
definedOn | GridPrimitive type the channel is defined on, default 0D vertices |
◆ getFirstChannel() [1/2]
std::shared_ptr< const Channel > inviwo::discretedata::DataSet::getFirstChannel |
( |
| ) |
const |
Returns the first channel from an unordered list.
◆ getFirstChannel() [2/2]
template<typename T , ind N>
std::shared_ptr< const DataChannel< T, N > > inviwo::discretedata::DataSet::getFirstChannel |
( |
| ) |
const |
Returns the first channel from an unordered list.
◆ getGrid() [1/2]
template<typename G >
const std::shared_ptr<const G> inviwo::discretedata::DataSet::getGrid |
( |
| ) |
const |
|
inline |
Returns a const typed shared pointer to the grid, if casting is possible.
◆ getGrid() [2/2]
template<typename G >
std::shared_ptr<G> inviwo::discretedata::DataSet::getGrid |
( |
| ) |
|
|
inline |
Returns a typed shared pointer to the grid, if casting is possible.
◆ getNumChannels()
ind inviwo::discretedata::DataSet::getNumChannels |
( |
| ) |
const |
|
inline |
Number of channels currently held
◆ removeChannel()
bool inviwo::discretedata::DataSet::removeChannel |
( |
std::shared_ptr< const Channel > |
channel | ) |
|
Remove channel from set by shared pointer, data remains valid if shared outside Swaps position in vector
- Parameters
-
channel | Shared pointer to data |
- Returns
- Successful - channel was saved in the set indeed
◆ channels_
DataChannelMap inviwo::discretedata::DataSet::channels_ |
|
protected |
Set of data channels Indexed by name and defining dimension (0D vertices, 1D edges etc).
◆ grid
const std::shared_ptr<const Connectivity> inviwo::discretedata::DataSet::grid |
Connectivity of grid Several grid types are possible (rectlinear, structured, unstructured)
The documentation for this class was generated from the following files: