Commit 29a2ceb5 authored by Alexander Wiebel's avatar Alexander Wiebel

[CHANGE] finished renaming WMMarchingCubes to WMIsosurface

parent 5ebd81da
......@@ -71,18 +71,18 @@ const char** WMDistanceMapIsosurface::getXPMIcon() const
void WMDistanceMapIsosurface::moduleMain()
{
//////////////////////////////////////////////////////////////////////////////////
// Marching Cubes
// Isosurface
//////////////////////////////////////////////////////////////////////////////////
// create an instance using the prototypes
m_marchingCubesModule = WModuleFactory::getModuleFactory()->create( WModuleFactory::getModuleFactory()->getPrototypeByName( "Isosurface" ) );
m_isosurfaceModule = WModuleFactory::getModuleFactory()->create( WModuleFactory::getModuleFactory()->getPrototypeByName( "Isosurface" ) );
// add the marching cubes to the container
add( m_marchingCubesModule );
// add the isosurface to the container
add( m_isosurfaceModule );
// now wait for it to be ready
m_marchingCubesModule->isReady().wait();
boost::shared_ptr< WProperties > mcProps = m_marchingCubesModule->getProperties();
m_isosurfaceModule->isReady().wait();
boost::shared_ptr< WProperties > mcProps = m_isosurfaceModule->getProperties();
m_isoValueProp = mcProps->getProperty( "Iso value" )->toPropDouble();
m_isoValueProp->set( 0.2 );
m_isoValueProp->setMin( 0.0 );
......@@ -120,9 +120,9 @@ void WMDistanceMapIsosurface::moduleMain()
// NOTE: you can use the WModuleContainer::applyModule functions here, which, in this case, is possible, since the connectors
// can be connected unambiguously (one to one connection). But to show how hard wiring works, we do it manually here.
m_marchingCubesModule->getInputConnector( "values" )->connect( m_distanceMapModule->getOutputConnector( "out" ) );
m_isosurfaceModule->getInputConnector( "values" )->connect( m_distanceMapModule->getOutputConnector( "out" ) );
// this is the same as doing it the other way around.
// m_distanceMapModule->getOutputConnector( "out" )->connect( m_marchingCubesModule->getInputConnector( "values" ) );
// m_distanceMapModule->getOutputConnector( "out" )->connect( m_isosurfaceModule->getInputConnector( "values" ) );
// simple, isn't it? ;-)
//////////////////////////////////////////////////////////////////////////////////
......@@ -182,6 +182,6 @@ void WMDistanceMapIsosurface::requirements()
void WMDistanceMapIsosurface::activate()
{
m_marchingCubesModule->getProperties()->getProperty( "active" )->toPropBool()->set( m_active->get() );
m_isosurfaceModule->getProperties()->getProperty( "active" )->toPropBool()->set( m_active->get() );
}
......@@ -34,7 +34,7 @@
#include "core/kernel/WModuleOutputForwardData.h"
/**
* Computes a distance map from an anatomy dataset and renders it as isosurface. It is a composition of marching cubes and the
* Computes a distance map from an anatomy dataset and renders it as isosurface. It is a composition of isosurface and the
* distance map module.
* \ingroup modules
*/
......@@ -100,7 +100,7 @@ private:
boost::shared_ptr< WModuleInputForwardData< WDataSetScalar > > m_input; //!< Input connector required by this module.
boost::shared_ptr< WModuleOutputForwardData< WDataSetScalar > > m_output; //!< Connector to provide the distance map to other modules.
boost::shared_ptr< WModule > m_marchingCubesModule; //!< The marching cubes module used in this container.
boost::shared_ptr< WModule > m_isosurfaceModule; //!< The isosurface module used in this container.
boost::shared_ptr< WModule > m_distanceMapModule; //!< The distance map module used in this container.
};
......
......@@ -56,13 +56,13 @@
#include "core/graphicsEngine/WGEUtils.h"
#include "core/kernel/WKernel.h"
#include "core/kernel/WSelectionManager.h"
#include "WMMarchingCubes.h"
#include "WMMarchingCubes.xpm"
#include "WMIsosurface.h"
#include "WMIsosurface.xpm"
// This line is needed by the module loader to actually find your module.
W_LOADABLE_MODULE( WMMarchingCubes )
W_LOADABLE_MODULE( WMIsosurface )
WMMarchingCubes::WMMarchingCubes():
WMIsosurface::WMIsosurface():
WModule(),
m_recompute( boost::shared_ptr< WCondition >( new WCondition() ) ),
m_dataSet(),
......@@ -73,28 +73,28 @@ WMMarchingCubes::WMMarchingCubes():
// Implement WModule::initializeConnectors instead.
}
WMMarchingCubes::~WMMarchingCubes()
WMIsosurface::~WMIsosurface()
{
// cleanup
removeConnectors();
}
boost::shared_ptr< WModule > WMMarchingCubes::factory() const
boost::shared_ptr< WModule > WMIsosurface::factory() const
{
return boost::shared_ptr< WModule >( new WMMarchingCubes() );
return boost::shared_ptr< WModule >( new WMIsosurface() );
}
const char** WMMarchingCubes::getXPMIcon() const
const char** WMIsosurface::getXPMIcon() const
{
return iso_surface_xpm;
}
const std::string WMMarchingCubes::getName() const
const std::string WMIsosurface::getName() const
{
return "Isosurface";
}
const std::string WMMarchingCubes::getDescription() const
const std::string WMIsosurface::getDescription() const
{
return "This module implements the marching cubes"
" algorithm with a consistent triangulation. It allows to compute isosurfaces"
......@@ -102,7 +102,7 @@ const std::string WMMarchingCubes::getDescription() const
" the surface as triangle soup.";
}
void WMMarchingCubes::moduleMain()
void WMIsosurface::moduleMain()
{
// use the m_input "data changed" flag
m_moduleState.setResetable( true, true );
......@@ -180,7 +180,7 @@ void WMMarchingCubes::moduleMain()
WKernel::getRunningKernel()->getGraphicsEngine()->getViewer()->getScene()->remove( m_moduleNode );
}
void WMMarchingCubes::connectors()
void WMIsosurface::connectors()
{
// initialize connectors
m_input = boost::shared_ptr< WModuleInputData < WDataSetScalar > >(
......@@ -200,7 +200,7 @@ void WMMarchingCubes::connectors()
WModule::connectors();
}
void WMMarchingCubes::properties()
void WMIsosurface::properties()
{
m_nbTriangles = m_infoProperties->addProperty( "Triangles", "The number of triangles in the produced mesh.", 0 );
m_nbTriangles->setMax( std::numeric_limits< int >::max() );
......@@ -326,7 +326,7 @@ namespace
}
} // namespace
void WMMarchingCubes::generateSurfacePre( double isoValue )
void WMIsosurface::generateSurfacePre( double isoValue )
{
debugLog() << "Isovalue: " << isoValue;
WAssert( ( *m_dataSet ).getValueSet()->order() == 0, "This module only works on scalars." );
......@@ -362,7 +362,7 @@ void WMMarchingCubes::generateSurfacePre( double isoValue )
}
}
void WMMarchingCubes::renderMesh()
void WMIsosurface::renderMesh()
{
{
// Remove the previous node in a thread safe way.
......@@ -434,7 +434,7 @@ void WMMarchingCubes::renderMesh()
// ------------------------------------------------
// Shader stuff
osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >( new WGEShader( "WMMarchingCubes", m_localPath ) );
osg::ref_ptr< WGEShader > shader = osg::ref_ptr< WGEShader >( new WGEShader( "WMIsosurface", m_localPath ) );
shader->addPreprocessor( WGEShaderPreprocessor::SPtr(
new WGEShaderPropertyDefineOptions< WPropBool >( m_useTextureProp, "COLORMAPPING_DISABLED", "COLORMAPPING_ENABLED" ) )
);
......@@ -451,10 +451,10 @@ void WMMarchingCubes::renderMesh()
m_moduleNodeInserted = true;
}
m_moduleNode->addUpdateCallback( new WGEFunctorCallback< osg::Node >( boost::bind( &WMMarchingCubes::updateGraphicsCallback, this ) ) );
m_moduleNode->addUpdateCallback( new WGEFunctorCallback< osg::Node >( boost::bind( &WMIsosurface::updateGraphicsCallback, this ) ) );
}
void WMMarchingCubes::updateGraphicsCallback()
void WMIsosurface::updateGraphicsCallback()
{
boost::unique_lock< boost::shared_mutex > lock;
lock = boost::unique_lock< boost::shared_mutex >( m_updateLock );
......
......@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WMMARCHINGCUBES_H
#define WMMARCHINGCUBES_H
#ifndef WMISOSURFACE_H
#define WMISOSURFACE_H
#include <map>
#include <string>
......@@ -47,23 +47,23 @@
* given on regular grids with axis-aligned cells.
* \ingroup modules
*/
class WMMarchingCubes : public WModule
class WMIsosurface : public WModule
{
/**
* Only UnitTests may be friends.
*/
friend class WMMarchingCubesTest;
friend class WMIsosurfaceTest;
public:
/**
* Standard constructor.
*/
WMMarchingCubes();
WMIsosurface();
/**
* Destructor.
*/
~WMMarchingCubes();
~WMIsosurface();
/**
* Gives back the name of this module.
......@@ -162,4 +162,4 @@ private:
osg::ref_ptr< osg::Geode > m_surfaceGeode; //!< Pointer to geode containing the surface.
};
#endif // WMMARCHINGCUBES_H
#endif // WMISOSURFACE_H
......@@ -13,8 +13,8 @@ ADD_MODULE( fiberDisplaySimple )
ADD_MODULE( fiberResampling )
ADD_MODULE( gridRenderer )
ADD_MODULE( imageSpaceLIC )
ADD_MODULE( isosurface )
ADD_MODULE( isosurfaceRaytracer )
ADD_MODULE( marchingCubes )
ADD_MODULE( navigationSlices )
ADD_MODULE( scalarOperator )
ADD_MODULE( superquadricGlyphs )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment