25 #ifndef WCSVCONVERTER_H
26 #define WCSVCONVERTER_H
33 #include <boost/lexical_cast.hpp>
35 #include "WConverterIndexes.h"
36 #include "WConverterVectors.h"
37 #include "WPropertyStatus.h"
38 #include "WProtonData.h"
39 #include "WSingleSelectorName.h"
40 #include "core/common/WLogger.h"
41 #include "core/common/WTransferFunction.h"
42 #include "core/dataHandler/WDataSetFibers.h"
43 #include "core/dataHandler/WDataSetPoints.h"
44 #include "core/dataHandler/WGrid.h"
45 #include "core/dataHandler/WGridRegular3D.h"
46 #include "core/dataHandler/WValueSet.h"
47 #include "core/dataHandler/WValueSetBase.h"
84 std::shared_ptr< WDataSetFibers >
getFibers();
91 std::shared_ptr< WDataSetPoints >
getPoints();
180 void addVertex( WDataSetCSV::Content::iterator dataRow );
196 void addEdepAndSize( WDataSetCSV::Content::iterator dataRow,
float* maxEdep,
float* minEdep );
203 void addEventID( WDataSetCSV::Content::iterator dataRow );
std::shared_ptr< WConverterIndexes > SPtr
A shared_ptr to this class.
std::shared_ptr< WConverterVectors > SPtr
A shared_ptr to this class.
Test class of WCsvConverter class.
Converts the csv data to points and fibers.
WPropertyStatus::SPtr m_propertyStatus
includes all property groups
std::shared_ptr< WDataSetPoints > getPoints()
Getter.
WModule::SPtr m_colorBar
Stores reference to the given transfer function color bar module.
void addEdepAndSize(WDataSetCSV::Content::iterator dataRow, float *maxEdep, float *minEdep)
Create edep and sizes for point/fiber renderer.
void setTransferFunction(std::shared_ptr< std::vector< unsigned char > > data)
Creates output for transfer function.
void normalizeEdeps(SPFloatVector edeps, SPFloatVector colorArray, float maxEdep, float minEdep)
Normalize energy deposition values to use as RGB values.
std::shared_ptr< std::vector< float > > SPFloatVector
represents a std::shared_ptr to a vector containing a vector of floats.
void addVertex(WDataSetCSV::Content::iterator dataRow)
Create vertex for point/fiber renderer.
std::shared_ptr< std::vector< size_t > > SPSizeVector
represents a std::shared_ptr to a vector containing a vector of size_t.
void addEventID(WDataSetCSV::Content::iterator dataRow)
Create eventID for Fiber renderer.
std::shared_ptr< WDataSetSingle > m_transferFunction
Stores the currently mapped transfer function.
void createOutputPointsAndData()
Create the points and selected data for Point Connector.
std::shared_ptr< WDataSetFibers > m_fibers
Stores information for the fiber display.
WCsvConverter(WProtonData::SPtr protonData, std::shared_ptr< WPropertyStatus > propertyStatus, WModule::SPtr colorBar)
Initializes the vectors, indices and transfer function color bar Calls setOutputFromCSV.
std::shared_ptr< WDataSetPoints > m_points
Stores information for the point renderer.
WProtonData::SPtr m_protonData
Stores information form csv content.
float stringToDouble(std::string str)
checks whether the string is a number (double)
bool checkConditionToPass(WDataSetCSV::Content::iterator dataRow)
checks whether the requirements are fulfilled.
void calculateFibers()
calculate the property of WDataSetFiber (index, length, verticesReverse)
std::shared_ptr< WDataSetPoints > m_pointsAndData
Stores information for the point Conncetor.
int stringToInt(std::string str)
checks whether the string is a number (int)
void setOutputFromCSV()
Create outputs, so it can be displayed by the fiber display and the point renderer.
float getClusterSize(float edep)
Computes the cluster size.
void addColor(WColor plainColor)
Create color for point/Fiber renderer.
bool checkIfOutputIsNull()
the cast value from string to float
std::shared_ptr< WDataSetSingle > getTransferFunction()
Getter.
std::shared_ptr< WDataSetPoints > getPointsAndData()
Getter.
void createOutputPoints()
Create the points for points renderer.
WConverterVectors::SPtr m_vectors
Stores points for point and fiber renderer.
WConverterIndexes::SPtr m_indexes
Stores indexes for fiber renderer.
std::shared_ptr< std::vector< unsigned char > > sampleTransferFunction()
Computes gradient vector from transfer function specified in visualization properties.
void createOutputFibers()
Create the fibers for fiber renderer.
std::shared_ptr< WDataSetFibers > getFibers()
Getter.
std::shared_ptr< WModule > SPtr
Shared pointer to a WModule.
std::shared_ptr< WPropertyStatus > SPtr
A shared_ptr to this class.
std::shared_ptr< WProtonData > SPtr
shared_ptr that points to itself