25 #ifndef WMGAUSSFILTERING_H
26 #define WMGAUSSFILTERING_H
35 #include <osg/Uniform>
37 #include "core/dataHandler/WDataSetScalar.h"
38 #include "core/kernel/WModule.h"
39 #include "core/kernel/WModuleInputData.h"
66 virtual const std::string
getName()
const;
80 virtual std::shared_ptr< WModule >
factory()
const;
134 size_t nX,
size_t nY,
size_t nZ,
size_t x,
size_t y,
size_t z,
size_t offset );
145 std::shared_ptr< WGridRegular3D > grid,
146 std::shared_ptr< WProgress > prog );
161 template<
typename T >
163 const std::vector<T>&vals,
164 std::shared_ptr< WProgress > prog,
165 size_t Nx,
size_t Ny,
size_t Nz,
size_t dx,
size_t dy,
size_t dz );
180 template<
typename T >
183 std::shared_ptr< WProgress > prog,
184 size_t Nx,
size_t Ny,
size_t Nz,
size_t dx,
size_t dy,
size_t dz );
194 unsigned int iterations );
196 std::shared_ptr< WModuleInputData< WDataSetScalar > >
m_input;
197 std::shared_ptr< WModuleOutputData< WDataSetScalar > >
m_output;
Gauss filtering for WDataSetScalar.
std::shared_ptr< WDataSetScalar > m_dataSet
Pointer providing access to the treated data set in the whole module.
double filterAtPosition(std::shared_ptr< WValueSet< T > > vals, size_t nX, size_t nY, size_t nZ, size_t x, size_t y, size_t z, size_t offset)
Simple convolution using a small gauss-like mask.
virtual void moduleMain()
Entry point after loading the module.
virtual void properties()
Initialize the properties for this module.
~WMGaussFiltering()
Destructor.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
std::shared_ptr< WModuleInputData< WDataSetScalar > > m_input
Input connector required by this module.
std::shared_ptr< WModuleOutputData< WDataSetScalar > > m_output
The only output of this filter module.
void filterField1D(std::vector< T > *newVals, const std::vector< T > &vals, std::shared_ptr< WProgress > prog, size_t Nx, size_t Ny, size_t Nz, size_t dx, size_t dy, size_t dz)
Run the 1D Gaussian filter over the field.
std::vector< double > filterField(std::shared_ptr< WValueSet< T > > vals, std::shared_ptr< WGridRegular3D > grid, std::shared_ptr< WProgress > prog)
Run the filter over the field.
std::shared_ptr< WValueSet< double > > iterativeFilterField(std::shared_ptr< WValueSet< T > > vals, unsigned int iterations)
Run the filter iteratively over the field.
virtual const std::string getDescription() const
Gives back a description of this module.
WPropBool m_3DMaskMode
1D or 3D filtering flag
virtual void connectors()
Initialize the connectors this module is using.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
WMGaussFiltering()
Standard constructor.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
virtual const std::string getName() const
Gives back the name of this module.
WPropInt m_iterations
The number of iterations to use for filtering.
Class representing a single module of OpenWalnut.
Base Class for all value set types.