OpenWalnut
1.5.0dev
|
Represents a simple set of WFibers. More...
#include <WDataSetFibers.h>
Classes | |
class | ColorScheme |
Item used in the selection below also containing color info. More... | |
Public Types | |
typedef std::shared_ptr< WDataSetFibers > | SPtr |
Pointer to dataset. More... | |
typedef std::shared_ptr< const WDataSetFibers > | ConstSPtr |
Pointer to const dataset. More... | |
typedef std::shared_ptr< std::vector< float > > | VertexArray |
List of vertex coordinates in term of components of vertices. More... | |
typedef std::shared_ptr< std::vector< size_t > > | IndexArray |
Index list indexing fibers in VertexArray in terms of vertex numbers. More... | |
typedef std::shared_ptr< std::vector< size_t > > | LengthArray |
Lengths of fibers in terms of vertices. More... | |
typedef std::shared_ptr< std::vector< float > > | TangentArray |
Tangents at each vertex in VertexArray. More... | |
typedef std::shared_ptr< std::vector< float > > | ColorArray |
Colors for each vertex in VertexArray. More... | |
typedef std::shared_ptr< std::vector< double > > | VertexParemeterArray |
Parameter storage for each vertex. More... | |
typedef std::shared_ptr< std::vector< double > > | LineParemeterArray |
Parameter storage for each line. More... | |
typedef WFiberIterator | iterator |
Iterator to go through the fibers. More... | |
typedef WFiberIterator | const_iterator |
Const iterator to go through fibers. More... | |
Public Types inherited from WDataSet | |
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 | |
WDataSetFibers (std::shared_ptr< std::vector< float > >vertices, std::shared_ptr< std::vector< size_t > > lineStartIndexes, std::shared_ptr< std::vector< size_t > > lineLengths, std::shared_ptr< std::vector< size_t > > verticesReverse, WBoundingBox boundingBox) | |
Constructs a new set of fibers. More... | |
WDataSetFibers (std::shared_ptr< std::vector< float > >vertices, std::shared_ptr< std::vector< size_t > > lineStartIndexes, std::shared_ptr< std::vector< size_t > > lineLengths, std::shared_ptr< std::vector< size_t > > verticesReverse) | |
Constructs a new set of fibers. More... | |
WDataSetFibers (std::shared_ptr< std::vector< float > >vertices, std::shared_ptr< std::vector< size_t > > lineStartIndexes, std::shared_ptr< std::vector< size_t > > lineLengths, std::shared_ptr< std::vector< size_t > > verticesReverse, WBoundingBox boundingBox, VertexParemeterArray vertexParameters) | |
Constructs a new set of fibers. More... | |
WDataSetFibers (std::shared_ptr< std::vector< float > >vertices, std::shared_ptr< std::vector< size_t > > lineStartIndexes, std::shared_ptr< std::vector< size_t > > lineLengths, std::shared_ptr< std::vector< size_t > > verticesReverse, VertexParemeterArray vertexParameters) | |
Constructs a new set of fibers. More... | |
WDataSetFibers () | |
Constructs a new set of tracts. More... | |
size_t | size () const |
Get number of tracts in this data set. More... | |
virtual bool | isTexture () const |
Determines whether this dataset can be used as a texture. 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... | |
VertexArray | getVertices () const |
Getter for the lines' vertices. More... | |
size_t | getNbVertices () const |
Getter for the total number of vertices over all lines. More... | |
IndexArray | getLineStartIndexes () const |
Return the indices that indicate at which vertex ID each line begins in the vertex array. More... | |
LengthArray | getLineLengths () const |
Return the number of vertices for all lines. More... | |
IndexArray | getVerticesReverse () const |
Returns a reverse lookup table that allow do find out which vertex belongs to which line. More... | |
TangentArray | getTangents () const |
Returns an array containing the tangents of the fibers at the vertices. More... | |
VertexParemeterArray | getVertexParameters (size_t parameterIndex=0) const |
Get the parameter values for each vertex. More... | |
void | setVertexParameters (std::vector< VertexParemeterArray > parameters) |
Set the given array of parameters to be the vertex parameters of this fiber dataset. More... | |
LineParemeterArray | getLineParameters (size_t parameterIndex=0) const |
Get the parameter values for each line. More... | |
void | setLineParameters (std::vector< LineParemeterArray > parameters) |
Set an array to be the list of line parameters. More... | |
void | addColorScheme (WDataSetFibers::ColorArray colors, std::string name, std::string description) |
This method adds a new color scheme to the list of available colors. More... | |
void | removeColorScheme (WDataSetFibers::ColorArray colors) |
This method removes the specified color scheme from the list and triggers an update. More... | |
void | replaceColorScheme (WDataSetFibers::ColorArray oldColors, WDataSetFibers::ColorArray newColors) |
Replaces the specified old color scheme by the new color scheme. More... | |
const std::shared_ptr< ColorScheme > | getColorScheme (std::string name) const |
Get the color scheme with the specified name. More... | |
const std::shared_ptr< ColorScheme > | getColorScheme (size_t idx) const |
Get the color scheme with the specified ID. More... | |
void | setSelectedColorScheme (size_t idx) |
Sets the selected color scheme. More... | |
const std::shared_ptr< ColorScheme > | getColorScheme () const |
Convenience method returning the currently selected scheme. More... | |
const WPropSelection | getColorSchemeProperty () const |
Returns the property controlling the color scheme selection. More... | |
WPosition | getPosition (size_t fiber, size_t vertex) const |
returns the position in space for a vertex of a given fiber More... | |
WPosition | getTangent (size_t fiber, size_t vertex) const |
calculates the tangent for a point on the fiber More... | |
std::size_t | getLengthOfLine (std::size_t fiber) const |
Returns the number of points for a given fiber. More... | |
std::size_t | getStartIndex (std::size_t fiber) const |
Get the index of the first vertex of a given fiber. More... | |
WBoundingBox | getBoundingBox () const |
Get the bounding box. More... | |
WFiber | operator[] (size_t numTract) const |
Constructs a WFiber out of the given tract number. More... | |
OW_API_DEPRECATED const_iterator | begin () const |
Returns an iterator to the first fiber of the dataset. More... | |
OW_API_DEPRECATED const_iterator | end () const |
Returns an iterator pointing beyond the last fiber. More... | |
WIteratorRange< WFiberIterator > | fibers () const |
Creates a range of iterators that allows for forward iteration of the fibers in this dataset. More... | |
Public Member Functions inherited from WDataSet | |
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 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... | |
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... | |
Static Public Member Functions inherited from WDataSet | |
static std::shared_ptr< WPrototyped > | getPrototype () |
Returns a prototype instantiated with the true type of the deriving class. More... | |
Static Protected Attributes | |
static std::shared_ptr< WPrototyped > | m_prototype = std::shared_ptr< WPrototyped >() |
The prototype as singleton. More... | |
Static Protected Attributes inherited from WDataSet | |
static std::shared_ptr< WPrototyped > | m_prototype = std::shared_ptr< WPrototyped >() |
The prototype as singleton. More... | |
Private Member Functions | |
void | init () |
This does the common initialisation of the constructors. More... | |
Private Attributes | |
VertexArray | m_vertices |
Point vector for all fibers. More... | |
TangentArray | m_tangents |
Point vector for tangents at each vertex, used for fake tubes. More... | |
std::shared_ptr< WItemSelection > | m_colors |
An array of color arrays. More... | |
WPropSelection | m_colorProp |
Property keeping track of the active color in m_colors. More... | |
IndexArray | m_lineStartIndexes |
Line vector that contains the start index of its first point for each line. More... | |
LengthArray | m_lineLengths |
Line vector that contains the number of vertices for each line. More... | |
IndexArray | m_verticesReverse |
Reverse lookup table for which point belongs to which fiber. More... | |
WBoundingBox | m_bb |
Axis aligned bounding box for all tract-vertices of this dataset. More... | |
std::vector< VertexParemeterArray > | m_vertexParameters |
Parameter array. More... | |
std::vector< LineParemeterArray > | m_lineParameters |
Parameter array. More... | |
Additional Inherited Members | |
Protected Attributes inherited from WDataSet | |
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... | |
Represents a simple set of WFibers.
Definition at line 54 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< float > > WDataSetFibers::ColorArray |
Colors for each vertex in VertexArray.
Definition at line 91 of file WDataSetFibers.h.
Const iterator to go through fibers.
As the WFiberIterators does not allow any modifications per-se, the const iterator and the standard iterator are the same.
Definition at line 112 of file WDataSetFibers.h.
typedef std::shared_ptr< const WDataSetFibers > WDataSetFibers::ConstSPtr |
Pointer to const dataset.
Definition at line 66 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< size_t > > WDataSetFibers::IndexArray |
Index list indexing fibers in VertexArray in terms of vertex numbers.
Definition at line 76 of file WDataSetFibers.h.
Iterator to go through the fibers.
Definition at line 106 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< size_t > > WDataSetFibers::LengthArray |
Lengths of fibers in terms of vertices.
Definition at line 81 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< double > > WDataSetFibers::LineParemeterArray |
Parameter storage for each line.
Definition at line 101 of file WDataSetFibers.h.
typedef std::shared_ptr< WDataSetFibers > WDataSetFibers::SPtr |
Pointer to dataset.
Definition at line 61 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< float > > WDataSetFibers::TangentArray |
Tangents at each vertex in VertexArray.
Definition at line 86 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< float > > WDataSetFibers::VertexArray |
List of vertex coordinates in term of components of vertices.
Definition at line 71 of file WDataSetFibers.h.
typedef std::shared_ptr< std::vector< double > > WDataSetFibers::VertexParemeterArray |
Parameter storage for each vertex.
Definition at line 96 of file WDataSetFibers.h.
WDataSetFibers::WDataSetFibers | ( | std::shared_ptr< std::vector< float > > | vertices, |
std::shared_ptr< std::vector< size_t > > | lineStartIndexes, | ||
std::shared_ptr< std::vector< size_t > > | lineLengths, | ||
std::shared_ptr< std::vector< size_t > > | verticesReverse, | ||
WBoundingBox | boundingBox | ||
) |
Constructs a new set of fibers.
vertices | the vertices of the fibers, stored in x1,y1,z1,x2,y2,z2, ..., xn,yn,zn scheme |
lineStartIndexes | the index in which the fiber start (index of the 3D-vertex, not the index of the float in the vertices vector) |
lineLengths | how many vertices belong to a fiber |
verticesReverse | stores for each vertex the index of the corresponding fiber |
boundingBox | The bounding box of the fibers (first minimum, second maximum). |
Definition at line 58 of file WDataSetFibers.cpp.
References init(), m_lineLengths, and m_vertices.
WDataSetFibers::WDataSetFibers | ( | std::shared_ptr< std::vector< float > > | vertices, |
std::shared_ptr< std::vector< size_t > > | lineStartIndexes, | ||
std::shared_ptr< std::vector< size_t > > | lineLengths, | ||
std::shared_ptr< std::vector< size_t > > | verticesReverse | ||
) |
Constructs a new set of fibers.
This constructor determines the bounding box by using the coordinates of the vertices.
vertices | the vertices of the fibers, stored in x1,y1,z1,x2,y2,z2, ..., xn,yn,zn scheme |
lineStartIndexes | the index in which the fiber start (index of the 3D-vertex, not the index of the float in the vertices vector) |
lineLengths | how many vertices belong to a fiber |
verticesReverse | stores for each vertex the index of the corresponding fiber |
Definition at line 76 of file WDataSetFibers.cpp.
References WBoundingBoxImpl< VT >::expandBy(), init(), m_bb, m_lineLengths, and m_vertices.
WDataSetFibers::WDataSetFibers | ( | std::shared_ptr< std::vector< float > > | vertices, |
std::shared_ptr< std::vector< size_t > > | lineStartIndexes, | ||
std::shared_ptr< std::vector< size_t > > | lineLengths, | ||
std::shared_ptr< std::vector< size_t > > | verticesReverse, | ||
WBoundingBox | boundingBox, | ||
WDataSetFibers::VertexParemeterArray | vertexParameters | ||
) |
Constructs a new set of fibers.
vertices | the vertices of the fibers, stored in x1,y1,z1,x2,y2,z2, ..., xn,yn,zn scheme |
lineStartIndexes | the index in which the fiber start (index of the 3D-vertex, not the index of the float in the vertices vector) |
lineLengths | how many vertices belong to a fiber |
verticesReverse | stores for each vertex the index of the corresponding fiber |
boundingBox | The bounding box of the fibers (first minimum, second maximum). |
vertexParameters | optional per-vertex scalar. |
Definition at line 98 of file WDataSetFibers.cpp.
References init(), m_lineLengths, and m_vertices.
WDataSetFibers::WDataSetFibers | ( | std::shared_ptr< std::vector< float > > | vertices, |
std::shared_ptr< std::vector< size_t > > | lineStartIndexes, | ||
std::shared_ptr< std::vector< size_t > > | lineLengths, | ||
std::shared_ptr< std::vector< size_t > > | verticesReverse, | ||
WDataSetFibers::VertexParemeterArray | vertexParameters | ||
) |
Constructs a new set of fibers.
This constructor determines the bounding box by using the coordinates of the vertices.
vertices | the vertices of the fibers, stored in x1,y1,z1,x2,y2,z2, ..., xn,yn,zn scheme |
lineStartIndexes | the index in which the fiber start (index of the 3D-vertex, not the index of the float in the vertices vector) |
lineLengths | how many vertices belong to a fiber |
verticesReverse | stores for each vertex the index of the corresponding fiber |
vertexParameters | optional per-vertex scalar. |
Definition at line 118 of file WDataSetFibers.cpp.
References WBoundingBoxImpl< VT >::expandBy(), init(), m_bb, m_lineLengths, and m_vertices.
WDataSetFibers::WDataSetFibers | ( | ) |
Constructs a new set of tracts.
The constructed instance is not usable but needed for prototype mechanism.
Definition at line 52 of file WDataSetFibers.cpp.
Referenced by getPrototype().
void WDataSetFibers::addColorScheme | ( | WDataSetFibers::ColorArray | colors, |
std::string | name, | ||
std::string | description | ||
) |
This method adds a new color scheme to the list of available colors.
The color scheme needs to have a name and description to allow the user to identify which color has which meaning. If the specified color array already exists, only an update is triggered and the name and description is ignored. It detects the type of colors by its size.
colors | the color array. Needs to have exactly getVertices()->size() items. |
name | name of the color scheme. Should be a telling name. |
description | description. How calculated and so on. |
Definition at line 264 of file WDataSetFibers.cpp.
References WDataSetFibers::ColorScheme::GRAY, m_colors, m_vertices, WDataSetFibers::ColorScheme::RGB, and WDataSetFibers::ColorScheme::RGBA.
WDataSetFibers::const_iterator WDataSetFibers::begin | ( | ) | const |
Returns an iterator to the first fiber of the dataset.
The iterator does not allow any modification of the data. DEPRECATED: Use fibers().begin() or iterator range syntax instead.
Definition at line 441 of file WDataSetFibers.cpp.
WDataSetFibers::const_iterator WDataSetFibers::end | ( | ) | const |
Returns an iterator pointing beyond the last fiber.
The iterator does not allow any modification of the data. DEPRECATED: Use fibers().end() or iterator range syntax instead.
Definition at line 446 of file WDataSetFibers.cpp.
References m_lineLengths.
WIteratorRange< WFiberIterator > WDataSetFibers::fibers | ( | ) | const |
Creates a range of iterators that allows for forward iteration of the fibers in this dataset.
If the current iterator is not valid, behaviour is undefined. The end iterator of the returned range is the first invalid iterator after the last fiber.
Definition at line 451 of file WDataSetFibers.cpp.
References m_lineLengths.
WBoundingBox WDataSetFibers::getBoundingBox | ( | ) | const |
Get the bounding box.
Definition at line 422 of file WDataSetFibers.cpp.
References m_bb.
const std::shared_ptr< WDataSetFibers::ColorScheme > WDataSetFibers::getColorScheme | ( | ) | const |
Convenience method returning the currently selected scheme.
This is a comfortable alternative to using the color scheme selection property.
Definition at line 346 of file WDataSetFibers.cpp.
References m_colorProp.
const std::shared_ptr< WDataSetFibers::ColorScheme > WDataSetFibers::getColorScheme | ( | size_t | idx | ) | const |
Get the color scheme with the specified ID.
If the index is invalid, an exception gets thrown.
idx | the index |
Definition at line 340 of file WDataSetFibers.cpp.
References m_colors.
const std::shared_ptr< WDataSetFibers::ColorScheme > WDataSetFibers::getColorScheme | ( | std::string | name | ) | const |
Get the color scheme with the specified name.
If it is not found, an exception gets thrown.
name | the name of the color scheme |
WDHNoSuchDataSet | if the name could not be found. |
Definition at line 321 of file WDataSetFibers.cpp.
References m_colors.
Referenced by WFiberPointsIterator::getColor().
const WPropSelection WDataSetFibers::getColorSchemeProperty | ( | ) | const |
Returns the property controlling the color scheme selection.
Definition at line 351 of file WDataSetFibers.cpp.
References m_colorProp.
|
virtual |
Gets the description for this prototype.
Reimplemented from WDataSet.
Definition at line 219 of file WDataSetFibers.cpp.
std::size_t WDataSetFibers::getLengthOfLine | ( | std::size_t | fiber | ) | const |
Returns the number of points for a given fiber.
fiber | The index of the fiber. |
Definition at line 387 of file WDataSetFibers.cpp.
References m_lineLengths.
Referenced by WFiberSegmentsIterator::direction(), WFiberPointsIterator::getBaseIndex(), WFiberPointsIterator::getTangent(), WFiberIterator::numPoints(), and WFiberPointsIterator::operator*().
WDataSetFibers::LengthArray WDataSetFibers::getLineLengths | ( | ) | const |
Return the number of vertices for all lines.
Definition at line 249 of file WDataSetFibers.cpp.
References m_lineLengths.
WDataSetFibers::LineParemeterArray WDataSetFibers::getLineParameters | ( | size_t | parameterIndex = 0 | ) | const |
Get the parameter values for each line.
Same indexing as lines. Used to store additional scalar values for each line.
parameterIndex | there can be multiple parameters. The index defines the index of the parameter array to get. Default is 0. |
Definition at line 370 of file WDataSetFibers.cpp.
References m_lineParameters.
WDataSetFibers::IndexArray WDataSetFibers::getLineStartIndexes | ( | ) | const |
Return the indices that indicate at which vertex ID each line begins in the vertex array.
Definition at line 244 of file WDataSetFibers.cpp.
References m_lineStartIndexes.
|
virtual |
Gets the name of this prototype.
Reimplemented from WDataSet.
Definition at line 214 of file WDataSetFibers.cpp.
size_t WDataSetFibers::getNbVertices | ( | ) | const |
Getter for the total number of vertices over all lines.
Definition at line 239 of file WDataSetFibers.cpp.
References m_lineLengths.
WPosition WDataSetFibers::getPosition | ( | size_t | fiber, |
size_t | vertex | ||
) | const |
returns the position in space for a vertex of a given fiber
fiber | Index of fiber |
vertex | Index of vertex in fiber. |
Definition at line 380 of file WDataSetFibers.cpp.
References m_lineStartIndexes, and m_vertices.
Referenced by getTangent(), and WFiberPointsIterator::operator*().
|
static |
Returns a prototype instantiated with the true type of the deriving class.
Definition at line 224 of file WDataSetFibers.cpp.
References m_prototype, and WDataSetFibers().
std::size_t WDataSetFibers::getStartIndex | ( | std::size_t | fiber | ) | const |
Get the index of the first vertex of a given fiber.
This is used to find the three components 3 * start, 3 * start + 1 and 3 * start + 2 of the first vertex in the vertices vector.
fiber | The fiber to find the start index for. |
Definition at line 392 of file WDataSetFibers.cpp.
References m_lineStartIndexes.
Referenced by WFiberPointsIterator::getBaseIndex(), and WFiberIterator::getLineStartIndex().
WPosition WDataSetFibers::getTangent | ( | size_t | fiber, |
size_t | vertex | ||
) | const |
calculates the tangent for a point on the fiber
fiber | Index of fiber |
vertex | Index of vertex in fiber |
Definition at line 397 of file WDataSetFibers.cpp.
References getPosition(), and m_lineLengths.
Referenced by WFiberPointsIterator::getTangent().
WDataSetFibers::TangentArray WDataSetFibers::getTangents | ( | ) | const |
Returns an array containing the tangents of the fibers at the vertices.
Definition at line 259 of file WDataSetFibers.cpp.
References m_tangents.
WDataSetFibers::VertexParemeterArray WDataSetFibers::getVertexParameters | ( | size_t | parameterIndex = 0 | ) | const |
Get the parameter values for each vertex.
Same indexing as vertices. Used to store additional scalar values for each vertex.
parameterIndex | there can be multiple parameters. The index defines the index of the parameter array to get. Default is 0. |
Definition at line 356 of file WDataSetFibers.cpp.
References m_vertexParameters.
Referenced by WFiberPointsIterator::getParameter().
WDataSetFibers::VertexArray WDataSetFibers::getVertices | ( | ) | const |
Getter for the lines' vertices.
Definition at line 234 of file WDataSetFibers.cpp.
References m_vertices.
WDataSetFibers::IndexArray WDataSetFibers::getVerticesReverse | ( | ) | const |
Returns a reverse lookup table that allow do find out which vertex belongs to which line.
Definition at line 254 of file WDataSetFibers.cpp.
References m_verticesReverse.
|
private |
This does the common initialisation of the constructors.
Definition at line 142 of file WDataSetFibers.cpp.
References WPropertyHelper::PC_SELECTONLYONE::addTo(), WPropertyHelper::PC_NOTEMPTY::addTo(), m_colorProp, m_colors, WDataSet::m_infoProperties, m_lineLengths, WDataSet::m_properties, m_tangents, m_vertices, WDataSetFibers::ColorScheme::RGB, WThreadedRunner::run(), size(), and WThreadedRunner::wait().
Referenced by WDataSetFibers().
|
virtual |
Determines whether this dataset can be used as a texture.
Reimplemented from WDataSet.
Definition at line 204 of file WDataSetFibers.cpp.
WFiber WDataSetFibers::operator[] | ( | size_t | numTract | ) | const |
Constructs a WFiber out of the given tract number.
numTract | Number of the tract to generate a WFiber object for |
Definition at line 427 of file WDataSetFibers.cpp.
References m_lineLengths, m_vertices, WMixinVector< ValueT >::push_back(), WMixinVector< ValueT >::reserve(), and size().
void WDataSetFibers::removeColorScheme | ( | WDataSetFibers::ColorArray | colors | ) |
This method removes the specified color scheme from the list and triggers an update.
colors | the color array. |
Definition at line 288 of file WDataSetFibers.cpp.
References m_colors.
void WDataSetFibers::replaceColorScheme | ( | WDataSetFibers::ColorArray | oldColors, |
WDataSetFibers::ColorArray | newColors | ||
) |
Replaces the specified old color scheme by the new color scheme.
If the old color scheme did not exist, nothing happens.
oldColors | old colors to remove |
newColors | new colors to set |
Definition at line 307 of file WDataSetFibers.cpp.
References m_colors.
void WDataSetFibers::setLineParameters | ( | std::vector< LineParemeterArray > | parameters | ) |
Set an array to be the list of line parameters.
parameters | the list of parameters. Can be an empty vector to remove parameters. |
Definition at line 375 of file WDataSetFibers.cpp.
References m_lineParameters.
void WDataSetFibers::setSelectedColorScheme | ( | size_t | idx | ) |
Sets the selected color scheme.
idx | the index |
Definition at line 335 of file WDataSetFibers.cpp.
References m_colorProp, and m_colors.
void WDataSetFibers::setVertexParameters | ( | std::vector< VertexParemeterArray > | parameters | ) |
Set the given array of parameters to be the vertex parameters of this fiber dataset.
parameters | the list of parameters. Can be an empty vector to remove parameters. |
Definition at line 365 of file WDataSetFibers.cpp.
References m_vertexParameters.
size_t WDataSetFibers::size | ( | ) | const |
Get number of tracts in this data set.
Definition at line 209 of file WDataSetFibers.cpp.
References m_lineStartIndexes.
Referenced by init(), and operator[]().
|
private |
Axis aligned bounding box for all tract-vertices of this dataset.
Definition at line 559 of file WDataSetFibers.h.
Referenced by getBoundingBox(), and WDataSetFibers().
|
private |
Property keeping track of the active color in m_colors.
Definition at line 537 of file WDataSetFibers.h.
Referenced by getColorScheme(), getColorSchemeProperty(), init(), and setSelectedColorScheme().
|
private |
An array of color arrays.
The first two elements are: 0: global color, 1: local color
Definition at line 532 of file WDataSetFibers.h.
Referenced by addColorScheme(), getColorScheme(), init(), removeColorScheme(), replaceColorScheme(), and setSelectedColorScheme().
|
private |
Line vector that contains the number of vertices for each line.
Definition at line 549 of file WDataSetFibers.h.
Referenced by end(), fibers(), getLengthOfLine(), getLineLengths(), getNbVertices(), getTangent(), init(), operator[](), and WDataSetFibers().
|
private |
Parameter array.
Used to store additional scalar values for each line. Multiple parameter arrays allowed.
Definition at line 569 of file WDataSetFibers.h.
Referenced by getLineParameters(), and setLineParameters().
|
private |
Line vector that contains the start index of its first point for each line.
Definition at line 544 of file WDataSetFibers.h.
Referenced by getLineStartIndexes(), getPosition(), getStartIndex(), and size().
|
staticprotected |
The prototype as singleton.
Definition at line 511 of file WDataSetFibers.h.
Referenced by getPrototype().
|
private |
Point vector for tangents at each vertex, used for fake tubes.
Definition at line 527 of file WDataSetFibers.h.
Referenced by getTangents(), and init().
|
private |
Parameter array.
Used to store additional scalar values for each vertex. Multiple parameter arrays allowed.
Definition at line 564 of file WDataSetFibers.h.
Referenced by getVertexParameters(), and setVertexParameters().
|
private |
Point vector for all fibers.
Definition at line 522 of file WDataSetFibers.h.
Referenced by addColorScheme(), getPosition(), getVertices(), init(), operator[](), and WDataSetFibers().
|
private |
Reverse lookup table for which point belongs to which fiber.
Definition at line 554 of file WDataSetFibers.h.
Referenced by getVerticesReverse().