31 #include "WMDistanceMapIsosurface.h"
32 #include "WMDistanceMapIsosurface.xpm"
33 #include "core/dataHandler/WGridRegular3D.h"
34 #include "core/dataHandler/WSubject.h"
35 #include "core/kernel/WKernel.h"
36 #include "core/kernel/WModuleFactory.h"
37 #include "core/kernel/WPrototypeRequirement.h"
44 "Computes a smoothed version of the dataset"
45 " and a distance map on it. Finally it renders"
46 " this distance map using an isosurface. This isosurface"
47 " can be textured with values from scalar data sets in order to display"
48 " the structures at the given distance."
49 " This is <b>only</b> useful for peeled data." )
68 return distancemapIsosurface_xpm;
86 m_isoValueProp = mcProps->getProperty(
"Iso value" )->toPropDouble();
100 m_opacityProp = mcProps->getProperty(
"Opacity %" )->toPropInt();
156 m_input = std::shared_ptr< WModuleInputForwardData< WDataSetScalar > >(
158 "in",
"Dataset to compute distance map for." )
165 m_output = std::shared_ptr< WModuleOutputForwardData< WDataSetScalar > >(
167 "out",
"Distance map for the input data set." )
Computes a distance map from an anatomy dataset and renders it as isosurface.
std::shared_ptr< WModuleOutputForwardData< WDataSetScalar > > m_output
Connector to provide the distance map to other modules.
std::shared_ptr< WModuleInputForwardData< WDataSetScalar > > m_input
Input connector required by this module.
virtual void activate()
Callback for m_active.
WPropColor m_surfaceColorProp
Property indicating which color to use for non-textured surface.
std::shared_ptr< WModule > m_isosurfaceModule
The isosurface module used in this container.
~WMDistanceMapIsosurface()
Destructor.
virtual void connectors()
Initialize the connectors this module is using.
WMDistanceMapIsosurface()
Standard constructor.
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...
WPropInt m_opacityProp
Property holding the value for the opacity of the surface.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
WPropDouble m_isoValueProp
Property holding the value for the distance.
virtual void requirements()
Initialize requirements for this module.
std::shared_ptr< WModule > m_distanceMapModule
The distance map module used in this container.
virtual void moduleMain()
Entry point after loading the module.
WPropBool m_useTextureProp
Property indicating whether to use texturing with scalar data sets.
Class able to contain other modules.
virtual void stop()
Stops all modules inside this container.
virtual void add(std::shared_ptr< WModule > module, bool run=true)
Add a module to this container and start it.
static SPtr getModuleFactory()
Returns instance of the module factory to use to create modules.
Requirements m_requirements
The list of requirements.
void addConnector(std::shared_ptr< WModuleInputConnector > con)
Adds the specified connector to the list of inputs.
std::shared_ptr< WProperties > m_properties
The property object for the module.
void ready()
Call this whenever your module is ready and can react on property changes.
WPropBool m_active
True whenever the module should be active.
virtual void connectors()
Initialize connectors in this function.
This requirement ensures that the specified prototype exists in the factory.
void waitForStop()
Let the thread sleep until a stop request was given.