Commit 7c233cc2 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[ADD #83] added new handled data types

parent 32b502b8
......@@ -223,6 +223,7 @@ void WMData::moduleMain()
case W_DT_UNSIGNED_CHAR:
case W_DT_INT16:
case W_DT_UINT16:
case W_DT_UINT32:
case W_DT_SIGNED_INT:
m_dataSet->getTexture()->colormap()->set(
m_dataSet->getTexture()->colormap()->get().newSelector( WItemSelector::IndexList( 1, 0 ) )
......
......@@ -283,6 +283,28 @@ void WMMarchingCubes::generateSurfacePre( double isoValue )
}
break;
}
case W_DT_INT8:
{
boost::shared_ptr< WValueSet< int8_t > > vals;
vals = boost::shared_dynamic_cast< WValueSet< int8_t > >( ( *m_dataSet ).getValueSet() );
WAssert( vals, "Data type and data type indicator must fit." );
if( m_useMarchingLego->get( true ) )
{
m_triMesh = mlAlgo.generateSurface( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(),
m_grid->getTransformationMatrix(),
vals->rawDataVectorPointer(),
isoValue );
}
else
{
m_triMesh = mcAlgo.generateSurface( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(),
m_grid->getTransformationMatrix(),
vals->rawDataVectorPointer(),
isoValue,
m_progress );
}
break;
}
case W_DT_UINT16:
{
boost::shared_ptr< WValueSet< uint16_t > > vals;
......@@ -305,6 +327,28 @@ void WMMarchingCubes::generateSurfacePre( double isoValue )
}
break;
}
case W_DT_UINT32:
{
boost::shared_ptr< WValueSet< uint32_t > > vals;
vals = boost::shared_dynamic_cast< WValueSet< uint32_t > >( ( *m_dataSet ).getValueSet() );
WAssert( vals, "Data type and data type indicator must fit." );
if( m_useMarchingLego->get( true ) )
{
m_triMesh = mlAlgo.generateSurface( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(),
m_grid->getTransformationMatrix(),
vals->rawDataVectorPointer(),
isoValue );
}
else
{
m_triMesh = mcAlgo.generateSurface( m_grid->getNbCoordsX(), m_grid->getNbCoordsY(), m_grid->getNbCoordsZ(),
m_grid->getTransformationMatrix(),
vals->rawDataVectorPointer(),
isoValue,
m_progress );
}
break;
}
case W_DT_SIGNED_INT:
{
boost::shared_ptr< WValueSet< int32_t > > vals;
......
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