Commit e1367d89 authored by Mathias Goldau's avatar Mathias Goldau

[FIX] Enabled the voxelizer to work with the new grid and also reinserted...

[FIX] Enabled the voxelizer to work with the new grid and also reinserted deleted modules and commented them out in the modules-base.toolbox
parent ab9f473d
......@@ -34,9 +34,9 @@
#include <cxxtest/TestSuite.h>
#include "../../common/WLimits.h"
#include "../../common/exceptions/WOutOfBounds.h"
#include "../../common/math/test/WVector3DTraits.h"
#include "../../common/WLimits.h"
#include "../WGridRegular3D.h"
using wmath::WVector3D;
......
......@@ -197,7 +197,7 @@ protected:
float dataArray[6] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0 }; // NOLINT array init list
std::vector< float > data( &dataArray[0], &dataArray[0] + sizeof( dataArray ) / sizeof( float ) );
boost::shared_ptr< WValueSetBase > newValueSet( new WValueSet< float >( 1, 6, data, W_DT_FLOAT ) );
boost::shared_ptr< WGrid > newGrid( new WGridRegular3D( 1, 1, 1, 1, 1, 1 ) );
boost::shared_ptr< WGrid > newGrid( new WGridRegular3D( 1, 1, 1 ) );
m_emptyDTIDataSet = boost::shared_ptr< WDataSetDTI >( new WDataSetDTI( newValueSet, newGrid ) );
boost::shared_ptr< std::vector< WFiber > > tracts( new std::vector< WFiber > );
......
......@@ -2,6 +2,7 @@
ADD_SUBDIRECTORY( arbitraryRois )
ADD_SUBDIRECTORY( boundingBox )
#ADD_SUBDIRECTORY( clusterDisplayVoxels )
ADD_SUBDIRECTORY( coordinateHUD )
ADD_SUBDIRECTORY( coordinateSystem )
ADD_SUBDIRECTORY( distanceMap )
......@@ -14,8 +15,10 @@ ADD_SUBDIRECTORY( imageSpaceLIC )
ADD_SUBDIRECTORY( isosurfaceRaytracer )
ADD_SUBDIRECTORY( lic )
ADD_SUBDIRECTORY( marchingCubes )
#ADD_SUBDIRECTORY( overlayAtlas )
ADD_SUBDIRECTORY( paintTexture )
ADD_SUBDIRECTORY( superquadricGlyphs )
ADD_SUBDIRECTORY( template )
ADD_SUBDIRECTORY( triangleMeshRenderer )
ADD_SUBDIRECTORY( vectorPlot )
ADD_SUBDIRECTORY( voxelizer )
......@@ -34,23 +34,24 @@
#include <osg/Geode>
#include <osg/Geometry>
#include "../../common/datastructures/WFiber.h"
#include "../../common/WColor.h"
#include "../../common/WLogger.h"
#include "../../common/datastructures/WFiber.h"
#include "../../common/WPropertyHelper.h"
#include "../../dataHandler/WDataSetFiberVector.h"
#include "../../dataHandler/WSubject.h"
#include "../../dataHandler/WGridTransformOrtho.h"
#include "../../graphicsEngine/WGEGeodeUtils.h"
#include "../../graphicsEngine/WGEGeometryUtils.h"
#include "../../graphicsEngine/WGEUtils.h"
#include "../../kernel/WKernel.h"
#include "WBresenham.h"
#include "WBresenhamDBL.h"
#include "WMVoxelizer.h"
#include "WRasterAlgorithm.h"
#include "WIntegrationParameterization.h"
#include "WCenterlineParameterization.h"
#include "WIntegrationParameterization.h"
#include "WMVoxelizer.h"
#include "WMVoxelizer.xpm"
#include "WRasterAlgorithm.h"
// This line is needed by the module loader to actually find your module.
W_LOADABLE_MODULE( WMVoxelizer )
......@@ -251,10 +252,12 @@ boost::shared_ptr< WGridRegular3D > WMVoxelizer::constructGrid( const std::pair<
mat( 1, 3 ) = bb.first[ 1 ];
mat( 2, 3 ) = bb.first[ 2 ];
boost::shared_ptr< WGridTransformOrtho > transform( new WGridTransformOrtho( mat ) );
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( nbVoxelsPerUnit * nbPosX,
nbVoxelsPerUnit * nbPosY,
nbVoxelsPerUnit * nbPosZ,
mat ) );
transform ) );
return grid;
}
......
......@@ -46,7 +46,7 @@ public:
{
WLogger::startup();
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( 3, 3, 3, 0, 0, 0, 1, 1, 1 ) );
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( 3, 3, 3 ) );
m_algo = boost::shared_ptr< WBresenhamDBL >( new WBresenhamDBL( grid, false ) );
}
......
......@@ -46,7 +46,7 @@ public:
{
WLogger::startup();
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( 3, 3, 3, 0, 0, 0, 1, 1, 1 ) );
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( 3, 3, 3 ) );
m_algo = boost::shared_ptr< WBresenham >( new WBresenham( grid, false ) );
}
......@@ -111,7 +111,14 @@ public:
*/
void testRasteringIn3rdQuadrant( void )
{
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( 3, 3, 3, -2, -2, -2, 1, 1, 1 ) );
wmath::WMatrix< double > mat( 4, 4 );
mat.makeIdentity();
mat( 0, 3 ) = -2.0;
mat( 1, 3 ) = -2.0;
mat( 2, 3 ) = -2.0;
boost::shared_ptr< WGridTransformOrtho > transform( new WGridTransformOrtho( mat ) ); // NOLINT this is not std::transform
boost::shared_ptr< WGridRegular3D > grid( new WGridRegular3D( 3, 3, 3, transform ) );
m_algo = boost::shared_ptr< WBresenham >( new WBresenham( grid, false ) );
wmath::WLine l;
......
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