template<typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType>
struct Carna::helpers::details::VolumeGridHelper::IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >
-
Creates textures that represents base::VolumeSegment::intensityVolume in video memory.
+
Creates textures that represents base::VolumeSegment::intensities in video memory.
- Author
- Leonid Kostrykin
- Date
- 26.3.15 - 27.3.15
diff --git a/include/Carna/base/Geometry.h b/include/Carna/base/Geometry.h
index 012965ad..950d3485 100644
--- a/include/Carna/base/Geometry.h
+++ b/include/Carna/base/Geometry.h
@@ -45,8 +45,8 @@ namespace base
*
* \note
* Conventionally, the default role for 3D textures that represent intensity data,
- * such as \ref presets::DRRStage::ROLE_INTENSITY_VOLUME or
- * \ref presets::CuttingPlanesStage::ROLE_INTENSITY_VOLUME, is 0.
+ * such as \ref presets::DRRStage::ROLE_INTENSITIES or
+ * \ref presets::CuttingPlanesStage::ROLE_INTENSITIES, is 0.
*
* What features a geometry object aggregates depends on the \c %geometryType and
* what the corresponding rendering stage expects. Typical examples are
diff --git a/include/Carna/base/VolumeGrid.h b/include/Carna/base/VolumeGrid.h
index 93f1ed89..7c56be85 100644
--- a/include/Carna/base/VolumeGrid.h
+++ b/include/Carna/base/VolumeGrid.h
@@ -390,7 +390,7 @@ template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType
SegmentIntensityVolumeType& VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelector::volume
( VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment )
{
- return segment.intensityVolume();
+ return segment.intensities();
}
@@ -398,7 +398,7 @@ template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType
const SegmentIntensityVolumeType& VolumeGrid< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensitySelector::volume
( const VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment )
{
- return segment.intensityVolume();
+ return segment.intensities();
}
diff --git a/include/Carna/base/VolumeSegment.h b/include/Carna/base/VolumeSegment.h
index 7c1a35a6..53fa001a 100644
--- a/include/Carna/base/VolumeSegment.h
+++ b/include/Carna/base/VolumeSegment.h
@@ -201,22 +201,22 @@ class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolume
/** \brief
* Sets the intensity volume data of this partition.
*/
- void setIntensityVolume( Association< SegmentIntensityVolumeType >* intensityVolume );
+ void setIntensities( Association< SegmentIntensityVolumeType >* intensities );
/** \brief
* References the intensity volume data of this partition.
- * \pre `hasIntensityVolume() == true`
+ * \pre `hasIntensities() == true`
*/
- SegmentIntensityVolumeType& intensityVolume();
+ SegmentIntensityVolumeType& intensities();
/** \overload
*/
- const SegmentIntensityVolumeType& intensityVolume() const;
+ const SegmentIntensityVolumeType& intensities() const;
/** \brief
* Tells whether this partition has intensity volume data associated.
*/
- bool hasIntensityVolume() const;
+ bool hasIntensities() const;
/** \brief
* Holds the coordinate offset this partition within the \ref grid "whole"
@@ -226,7 +226,7 @@ class VolumeSegment : public VolumeSegmentNormalsComponent< SegmentNormalsVolume
private:
- std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensityVolume;
+ std::unique_ptr< Association< SegmentIntensityVolumeType > > myIntensities;
}; // VolumeSegment
@@ -240,32 +240,32 @@ VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::VolumeSeg
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
-void VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensityVolume( Association< SegmentIntensityVolumeType >* intensityVolume )
+void VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensities( Association< SegmentIntensityVolumeType >* intensities )
{
- myIntensityVolume.reset( intensityVolume );
+ myIntensities.reset( intensities );
}
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
-SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolume()
+SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensities()
{
- CARNA_ASSERT( hasIntensityVolume() );
- return **myIntensityVolume;
+ CARNA_ASSERT( hasIntensities() );
+ return **myIntensities;
}
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
-const SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolume() const
+const SegmentIntensityVolumeType& VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensities() const
{
- CARNA_ASSERT( hasIntensityVolume() );
- return **myIntensityVolume;
+ CARNA_ASSERT( hasIntensities() );
+ return **myIntensities;
}
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
-bool VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::hasIntensityVolume() const
+bool VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::hasIntensities() const
{
- return myIntensityVolume.get() != nullptr && myIntensityVolume->get() != nullptr;
+ return myIntensities.get() != nullptr && myIntensities->get() != nullptr;
}
diff --git a/include/Carna/helpers/VolumeGridHelper.h b/include/Carna/helpers/VolumeGridHelper.h
index ff372373..385fc07d 100644
--- a/include/Carna/helpers/VolumeGridHelper.h
+++ b/include/Carna/helpers/VolumeGridHelper.h
@@ -479,7 +479,7 @@ base::Node* VolumeGridHelper< SegmentIntensityVolumeType, SegmentNormalsVolumeTy
segmentCoord.x() + 1 == myGrid->segmentCounts.x()
|| segmentCoord.y() + 1 == myGrid->segmentCounts.y()
|| segmentCoord.z() + 1 == myGrid->segmentCounts.z();
- const base::math::Vector3ui& volumeSize = segment.intensityVolume().size;
+ const base::math::Vector3ui& volumeSize = segment.intensities().size;
const base::math::Vector3f dimensions = !isTail ? regularSegmentDimensions
: ( ( volumeSize.cast< int >() - base::math::Vector3i( 1, 1, 1 ) )
.cast< float >().cwiseProduct( spacing.millimeters ) );
diff --git a/include/Carna/helpers/VolumeGridHelperDetails.h b/include/Carna/helpers/VolumeGridHelperDetails.h
index b3a26862..e7d98596 100644
--- a/include/Carna/helpers/VolumeGridHelperDetails.h
+++ b/include/Carna/helpers/VolumeGridHelperDetails.h
@@ -50,7 +50,7 @@ namespace VolumeGridHelper
/** \brief
* Creates \ref base::ManagedTexture3D "textures" that represents
- * \ref base::VolumeSegment::intensityVolume in video memory.
+ * \ref base::VolumeSegment::intensities in video memory.
*
* \author Leonid Kostrykin
* \date 26.3.15 - 27.3.15
@@ -70,7 +70,7 @@ struct IntensityTextureFactory
/** \brief
* Creates \ref base::ManagedTexture3D "texture" that represents the
- * \ref base::VolumeSegment::intensityVolume of \a segment in video memory.
+ * \ref base::VolumeSegment::intensities of \a segment in video memory.
*/
static base::ManagedTexture3D& createTexture
( const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment );
@@ -81,7 +81,7 @@ template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType
base::ManagedTexture3D& IntensityTextureFactory< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::createTexture
( const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment )
{
- return base::BufferedVectorFieldTexture< SegmentIntensityVolumeType >::create( segment.intensityVolume() );
+ return base::BufferedVectorFieldTexture< SegmentIntensityVolumeType >::create( segment.intensities() );
}
@@ -268,12 +268,12 @@ class IntensityComponent : public TextureManager< IntensityTextureFactory< Segme
* Holds the default \ref GeometryTypes "role" to use for
* \ref attachTexture "attaching textures" to \ref base::Geometry nodes.
*/
- const static unsigned int DEFAULT_ROLE_INTENSITY_VOLUME = 0;
+ const static unsigned int DEFAULT_ROLE_INTENSITIES = 0;
/** \brief
* Sets the \ref GeometryTypes "role" to use for
* \ref attachTexture "attaching textures" to \ref base::Geometry nodes to
- * \ref DEFAULT_ROLE_INTENSITY_VOLUME.
+ * \ref DEFAULT_ROLE_INTENSITIES.
*/
IntensityComponent();
@@ -281,27 +281,27 @@ class IntensityComponent : public TextureManager< IntensityTextureFactory< Segme
* Sets the \ref GeometryTypes "role" to use for
* \ref attachTexture "attaching textures" to \ref base::Geometry nodes.
*/
- void setIntensityVolumeRole( unsigned int role );
+ void setIntensitiesRole( unsigned int role );
/** \brief
* Tels the \ref GeometryTypes "role" used for
* \ref attachTexture "attaching textures" to \ref base::Geometry nodes.
*/
- unsigned int intensityVolumeRole() const;
+ unsigned int intensitiesRole() const;
protected:
/** \brief
* Attaches the \ref base::ManagedTexture3D "texture" that represents the
- * \ref base::VolumeSegment::intensityVolume of \a segment to \a geometry
- * using the \ref setIntensityVolumeRole "previously configured role".
+ * \ref base::VolumeSegment::intensities of \a segment to \a geometry
+ * using the \ref setIntensitiesRole "previously configured role".
*/
void attachTexture
( base::Geometry& geometry
, const base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment ) const;
/** \brief
- * Initializes \ref base::VolumeSegment::setIntensityVolume "intensity volume" of \a segment.
+ * Initializes \ref base::VolumeSegment::setIntensities "intensity volume" of \a segment.
*/
void initializeSegment
( base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment
@@ -312,20 +312,20 @@ class IntensityComponent : public TextureManager< IntensityTextureFactory< Segme
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::IntensityComponent()
- : role( DEFAULT_ROLE_INTENSITY_VOLUME )
+ : role( DEFAULT_ROLE_INTENSITIES )
{
}
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
-void IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensityVolumeRole( unsigned int role )
+void IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::setIntensitiesRole( unsigned int role )
{
this->role = role;
}
template< typename SegmentIntensityVolumeType, typename SegmentNormalsVolumeType >
-unsigned int IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensityVolumeRole() const
+unsigned int IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >::intensitiesRole() const
{
return role;
}
@@ -346,8 +346,8 @@ void IntensityComponent< SegmentIntensityVolumeType, SegmentNormalsVolumeType >:
( base::VolumeSegment< SegmentIntensityVolumeType, SegmentNormalsVolumeType >& segment
, const base::math::Vector3ui& size ) const
{
- SegmentIntensityVolumeType* const intensityVolume = new SegmentIntensityVolumeType( size );
- segment.setIntensityVolume( new base::Composition< SegmentIntensityVolumeType >( intensityVolume ) );
+ SegmentIntensityVolumeType* const intensities = new SegmentIntensityVolumeType( size );
+ segment.setIntensities( new base::Composition< SegmentIntensityVolumeType >( intensities ) );
}
diff --git a/include/Carna/presets/CuttingPlanesStage.h b/include/Carna/presets/CuttingPlanesStage.h
index dbbdfbe0..dd7fed31 100644
--- a/include/Carna/presets/CuttingPlanesStage.h
+++ b/include/Carna/presets/CuttingPlanesStage.h
@@ -71,7 +71,7 @@ class CARNA_LIB CuttingPlanesStage : public base::GeometryStage< void >
* Holds the \ref GeometryFeatures "role" that intensity volume data is expected
* to take when attached to \ref base::Geometry nodes.
*/
- const static unsigned int ROLE_INTENSITY_VOLUME;
+ const static unsigned int ROLE_INTENSITIES;
/** \brief
* Instantiates.
diff --git a/include/Carna/presets/DRRStage.h b/include/Carna/presets/DRRStage.h
index ebeb98d7..11c39b26 100644
--- a/include/Carna/presets/DRRStage.h
+++ b/include/Carna/presets/DRRStage.h
@@ -122,7 +122,7 @@ class CARNA_LIB DRRStage : public VolumeRenderingStage
* Holds the \ref GeometryFeatures "role" that HU volume data is expected to
* take when attached to \ref base::Geometry nodes.
*/
- const static unsigned int ROLE_INTENSITY_VOLUME = 0;
+ const static unsigned int ROLE_INTENSITIES = 0;
/** \brief
* Instantiates. The created stage will render such \ref base::Geometry scene
@@ -238,7 +238,7 @@ class CARNA_LIB DRRStage : public VolumeRenderingStage
virtual const base::ShaderProgram& acquireShader() override;
/** \brief
- * Maps \ref ROLE_INTENSITY_VOLUME to `huVolume`.
+ * Maps \ref ROLE_INTENSITIES to `huVolume`.
*/
virtual const std::string& uniformName( unsigned int role ) const override;
diff --git a/include/Carna/presets/DVRStage.h b/include/Carna/presets/DVRStage.h
index 205553df..e6093357 100644
--- a/include/Carna/presets/DVRStage.h
+++ b/include/Carna/presets/DVRStage.h
@@ -110,7 +110,7 @@ class CARNA_LIB DVRStage : public VolumeRenderingStage
* Holds the \ref GeometryFeatures "role" that intensity volume data is expected
* to take when attached to \ref base::Geometry nodes.
*/
- const static unsigned int ROLE_INTENSITY_VOLUME = 0;
+ const static unsigned int ROLE_INTENSITIES = 0;
/** \brief
* Holds the \ref GeometryFeatures "role" that the normal map is expected to
@@ -222,7 +222,7 @@ class CARNA_LIB DVRStage : public VolumeRenderingStage
virtual const base::ShaderProgram& acquireShader() override;
/** \brief
- * Maps \ref ROLE_INTENSITY_VOLUME to `huVolume` and \ref ROLE_NORMALS to `normalMap`.
+ * Maps \ref ROLE_INTENSITIES to `huVolume` and \ref ROLE_NORMALS to `normalMap`.
*/
virtual const std::string& uniformName( unsigned int role ) const override;
diff --git a/include/Carna/presets/MIPStage.h b/include/Carna/presets/MIPStage.h
index faa51b41..449cc366 100644
--- a/include/Carna/presets/MIPStage.h
+++ b/include/Carna/presets/MIPStage.h
@@ -73,7 +73,7 @@ class CARNA_LIB MIPStage : public VolumeRenderingStage
* Holds the \ref GeometryFeatures "role" that intensity volume data is expected
* to take when attached to \ref base::Geometry nodes.
*/
- const static unsigned int ROLE_INTENSITY_VOLUME = 0;
+ const static unsigned int ROLE_INTENSITIES = 0;
/** \brief
* Instantiates.
diff --git a/include/Carna/presets/MaskRenderingStage.h b/include/Carna/presets/MaskRenderingStage.h
index 05ca4b4f..a1b4db2d 100644
--- a/include/Carna/presets/MaskRenderingStage.h
+++ b/include/Carna/presets/MaskRenderingStage.h
@@ -65,22 +65,22 @@ class CARNA_LIB MaskRenderingStage : public VolumeRenderingStage
public:
const static base::Color DEFAULT_COLOR; ///< Holds the default rendering color.
- const static unsigned int ROLE_DEFAULT_MASK; ///< Holds the default value of \ref maskRole.
+ const static unsigned int DEFAULT_ROLE_MASK; ///< Holds the default value of \ref roleMask.
/** \brief
* Holds the \ref GeometryFeatures "role" that mask volume data is expected to
* take when attached to \ref base::Geometry nodes.
*/
- const unsigned int maskRole;
+ const unsigned int roleMask;
/** \brief
* Instantiates.
*
* The created stage will render such \ref base::Geometry scene graph nodes,
* whose \ref GeometryTypes "geometry types" equal \a geometryType. The mask
- * data will be obtained from \a maskRole.
+ * data will be obtained from \a roleMask.
*/
- explicit MaskRenderingStage( unsigned int geometryType, unsigned int maskRole = ROLE_DEFAULT_MASK );
+ explicit MaskRenderingStage( unsigned int geometryType, unsigned int roleMask = DEFAULT_ROLE_MASK );
/** \brief
* Deletes.
@@ -131,12 +131,12 @@ class CARNA_LIB MaskRenderingStage : public VolumeRenderingStage
virtual const base::ShaderProgram& acquireShader() override;
/** \brief
- * Maps \ref maskRole to `mask`.
+ * Maps \ref roleMask to `mask`.
*/
virtual const std::string& uniformName( unsigned int role ) const override;
/** \brief
- * Does nothing.
+ * Sets the border rendering mode and the rendering color.
*/
virtual void configureShader() override;
diff --git a/src/doc/doc_VersionLog.dox b/src/doc/doc_VersionLog.dox
index 6d18a068..1bfa4947 100644
--- a/src/doc/doc_VersionLog.dox
+++ b/src/doc/doc_VersionLog.dox
@@ -61,6 +61,7 @@ namespace Carna
*
* - Added \ref presets::MaskRenderingStage.
* - Added \ref base::math::computeFastGradient3f.
+ * - Renamed most occurances of "intensity volume" in attributes/fields/methods to "intensities" to be more consistent with "normals".
*/
} // namespace Carna
diff --git a/src/presets/CuttingPlanesStage.cpp b/src/presets/CuttingPlanesStage.cpp
index a074f3e5..6b0a577c 100644
--- a/src/presets/CuttingPlanesStage.cpp
+++ b/src/presets/CuttingPlanesStage.cpp
@@ -133,7 +133,7 @@ CuttingPlanesStage::VideoResources::PlaneMesh* CuttingPlanesStage::VideoResource
const float CuttingPlanesStage::DEFAULT_WINDOWING_WIDTH = 1.0f;
const float CuttingPlanesStage::DEFAULT_WINDOWING_LEVEL = 0.5f;
-const unsigned int CuttingPlanesStage::ROLE_INTENSITY_VOLUME = 0;
+const unsigned int CuttingPlanesStage::ROLE_INTENSITIES = 0;
CuttingPlanesStage::CuttingPlanesStage( unsigned int volumeGeometryType, unsigned int planeGeometryType )
@@ -237,7 +237,7 @@ void CuttingPlanesStage::render( const base::Renderable& volume )
/* Bind texture and volumeSampler to free texture unit.
*/
const static unsigned int TEXTURE_UNIT = base::Texture< 0 >::SETUP_UNIT + 1;
- const base::ManagedTexture3D& texture = static_cast< const base::ManagedTexture3D& >( volume.geometry().feature( ROLE_INTENSITY_VOLUME ) );
+ const base::ManagedTexture3D& texture = static_cast< const base::ManagedTexture3D& >( volume.geometry().feature( ROLE_INTENSITIES ) );
this->videoResource( texture ).get().bind( TEXTURE_UNIT );
vr->volumeSampler.bind( TEXTURE_UNIT );
diff --git a/src/presets/DRRStage.cpp b/src/presets/DRRStage.cpp
index 6ddecc9e..8f57b5b0 100644
--- a/src/presets/DRRStage.cpp
+++ b/src/presets/DRRStage.cpp
@@ -253,7 +253,7 @@ void DRRStage::renderPass
void DRRStage::createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler )
{
- registerSampler( ROLE_INTENSITY_VOLUME, new base::Sampler
+ registerSampler( ROLE_INTENSITIES, new base::Sampler
( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP
, base::Sampler::FILTER_LINEAR, base::Sampler::FILTER_LINEAR ) );
}
@@ -267,12 +267,12 @@ const base::ShaderProgram& DRRStage::acquireShader()
const std::string& DRRStage::uniformName( unsigned int role ) const
{
- const static std::string ROLE_INTENSITY_VOLUME_NAME = "huVolume";
+ const static std::string ROLE_INTENSITIES_NAME = "huVolume";
switch( role )
{
- case ROLE_INTENSITY_VOLUME:
- return ROLE_INTENSITY_VOLUME_NAME;
+ case ROLE_INTENSITIES:
+ return ROLE_INTENSITIES_NAME;
default:
CARNA_FAIL( "unknown role" );
diff --git a/src/presets/DVRStage.cpp b/src/presets/DVRStage.cpp
index e4137158..0897bc4f 100644
--- a/src/presets/DVRStage.cpp
+++ b/src/presets/DVRStage.cpp
@@ -269,7 +269,7 @@ void DVRStage::createVolumeSamplers( const std::function< void( unsigned int, ba
{
/* Create sampler for the intensity volume texture.
*/
- registerSampler( ROLE_INTENSITY_VOLUME, new base::Sampler
+ registerSampler( ROLE_INTENSITIES, new base::Sampler
( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP
, base::Sampler::FILTER_LINEAR, base::Sampler::FILTER_LINEAR ) );
@@ -289,13 +289,13 @@ const base::ShaderProgram& DVRStage::acquireShader()
const std::string& DVRStage::uniformName( unsigned int role ) const
{
- const static std::string ROLE_INTENSITY_VOLUME_NAME = "huVolume";
- const static std::string ROLE_NORMALS_NAME = "normalMap";
+ const static std::string ROLE_INTENSITIES_NAME = "huVolume";
+ const static std::string ROLE_NORMALS_NAME = "normalMap";
switch( role )
{
- case ROLE_INTENSITY_VOLUME:
- return ROLE_INTENSITY_VOLUME_NAME;
+ case ROLE_INTENSITIES:
+ return ROLE_INTENSITIES_NAME;
case ROLE_NORMALS:
return ROLE_NORMALS_NAME;
diff --git a/src/presets/MIPStage.cpp b/src/presets/MIPStage.cpp
index 972f9ef4..97645287 100644
--- a/src/presets/MIPStage.cpp
+++ b/src/presets/MIPStage.cpp
@@ -207,7 +207,7 @@ void MIPStage::renderPass
void MIPStage::createVolumeSamplers( const std::function< void( unsigned int, base::Sampler* ) >& registerSampler )
{
- registerSampler( ROLE_INTENSITY_VOLUME, new base::Sampler
+ registerSampler( ROLE_INTENSITIES, new base::Sampler
( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP
, base::Sampler::FILTER_LINEAR, base::Sampler::FILTER_LINEAR ) );
}
@@ -221,12 +221,12 @@ const base::ShaderProgram& MIPStage::acquireShader()
const std::string& MIPStage::uniformName( unsigned int role ) const
{
- const static std::string ROLE_INTENSITY_VOLUME_NAME = "huVolume";
+ const static std::string ROLE_INTENSITIES_NAME = "huVolume";
switch( role )
{
- case ROLE_INTENSITY_VOLUME:
- return ROLE_INTENSITY_VOLUME_NAME;
+ case ROLE_INTENSITIES:
+ return ROLE_INTENSITIES_NAME;
default:
CARNA_FAIL( "unknown role" );
diff --git a/src/presets/MaskRenderingStage.cpp b/src/presets/MaskRenderingStage.cpp
index 97aca019..7fb6540f 100644
--- a/src/presets/MaskRenderingStage.cpp
+++ b/src/presets/MaskRenderingStage.cpp
@@ -57,13 +57,13 @@ MaskRenderingStage::Details::Details()
// ----------------------------------------------------------------------------------
const base::Color MaskRenderingStage::DEFAULT_COLOR = base::Color::GREEN;
-const unsigned int MaskRenderingStage::ROLE_DEFAULT_MASK = 2;
+const unsigned int MaskRenderingStage::DEFAULT_ROLE_MASK = 2;
-MaskRenderingStage::MaskRenderingStage( unsigned int geometryType, unsigned int maskRole )
+MaskRenderingStage::MaskRenderingStage( unsigned int geometryType, unsigned int roleMask )
: VolumeRenderingStage( geometryType )
, pimpl( new Details() )
- , maskRole( maskRole )
+ , roleMask( roleMask )
{
}
@@ -80,7 +80,7 @@ MaskRenderingStage::~MaskRenderingStage()
MaskRenderingStage* MaskRenderingStage::clone() const
{
- MaskRenderingStage* const result = new MaskRenderingStage( geometryType, maskRole );
+ MaskRenderingStage* const result = new MaskRenderingStage( geometryType, roleMask );
result->setEnabled( isEnabled() );
return result;
}
@@ -186,7 +186,7 @@ void MaskRenderingStage::createVolumeSamplers( const std::function< void( unsign
{
/* Create sampler for the mask texture.
*/
- registerSampler( maskRole, new base::Sampler
+ registerSampler( roleMask, new base::Sampler
( base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP, base::Sampler::WRAP_MODE_CLAMP
, base::Sampler::FILTER_NEAREST, base::Sampler::FILTER_NEAREST ) );
}
@@ -201,7 +201,7 @@ const base::ShaderProgram& MaskRenderingStage::acquireShader()
const std::string& MaskRenderingStage::uniformName( unsigned int role ) const
{
const static std::string ROLE_MASK_NAME = "mask";
- if( role == maskRole )
+ if( role == roleMask )
{
return ROLE_MASK_NAME;
}
diff --git a/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp b/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp
index 6d6ca236..ee1399a9 100644
--- a/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp
+++ b/test/IntegrationTests/MaskRenderingStageIntegrationTest.cpp
@@ -83,7 +83,7 @@ void MaskRenderingStageIntegrationTest::test_shared_geometry_node()
//! [create_mask]
//! [attach_mask]
- geometry.putFeature( mr->maskRole, maskTexture );
+ geometry.putFeature( mr->roleMask, maskTexture );
maskTexture.release();
//! [attach_mask]
@@ -111,7 +111,7 @@ void MaskRenderingStageIntegrationTest::test_dedicated_geometry_node()
base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture
= base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >::create( *mask );
base::Geometry* const geometry = new base::Geometry( GEOMETRY_TYPE_MASK );
- geometry->putFeature( mr->maskRole, maskTexture );
+ geometry->putFeature( mr->roleMask, maskTexture );
geometry->localTransform = base::math::scaling4f( scene->scale() );
scene->root->attachChild( geometry );
maskTexture.release();
@@ -134,7 +134,7 @@ void MaskRenderingStageIntegrationTest::test_helper_geometry_node()
*/
typedef helpers::VolumeGridHelper< base::IntensityVolumeUInt8 > UInt8GridHelper;
UInt8GridHelper gridHelper( scene.volume().size );
- gridHelper.setIntensityVolumeRole( mr->maskRole );
+ gridHelper.setIntensitiesRole( mr->roleMask );
gridHelper.loadIntensities( [&scene]( const base::math::Vector3ui& voxel )
{
return ( scene.volume()( voxel ) + 1024 ) * 16 > 48000 ? 1.f : 0.f;
@@ -163,7 +163,7 @@ void MaskRenderingStageIntegrationTest::test_render_borders()
*/
typedef helpers::VolumeGridHelper< base::IntensityVolumeUInt8 > UInt8GridHelper;
UInt8GridHelper gridHelper( scene.volume().size );
- gridHelper.setIntensityVolumeRole( mr->maskRole );
+ gridHelper.setIntensitiesRole( mr->roleMask );
gridHelper.loadIntensities( [&scene]( const base::math::Vector3ui& voxel )
{
return ( scene.volume()( voxel ) + 1024 ) * 16 > 10000 ? 1.f : 0.f;
diff --git a/test/ModuleTests/MaskRenderingStageTest.cpp b/test/ModuleTests/MaskRenderingStageTest.cpp
index bc659681..04230ac4 100644
--- a/test/ModuleTests/MaskRenderingStageTest.cpp
+++ b/test/ModuleTests/MaskRenderingStageTest.cpp
@@ -66,7 +66,7 @@ void MaskRenderingStageTest::test_shared_geometry_node()
base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture
= base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >::create( *mask );
- geometry.putFeature( mr->maskRole, maskTexture );
+ geometry.putFeature( mr->roleMask, maskTexture );
maskTexture.release();
renderer->render( scene->cam(), *scene->root );
@@ -93,7 +93,7 @@ void MaskRenderingStageTest::test_dedicated_geometry_node()
base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >& maskTexture
= base::BufferedVectorFieldTexture< base::IntensityVolumeUInt8 >::create( *mask );
base::Geometry* const geometry = new base::Geometry( GEOMETRY_TYPE_MASK );
- geometry->putFeature( mr->maskRole, maskTexture );
+ geometry->putFeature( mr->roleMask, maskTexture );
geometry->localTransform = base::math::scaling4f( scene->scale() );
scene->root->attachChild( geometry );
maskTexture.release();
diff --git a/test/ModuleTests/VolumeGridTest.cpp b/test/ModuleTests/VolumeGridTest.cpp
index f92ebfd0..8389b02b 100644
--- a/test/ModuleTests/VolumeGridTest.cpp
+++ b/test/ModuleTests/VolumeGridTest.cpp
@@ -70,7 +70,7 @@ void VolumeGridTestUInt16::test_parenthesisOperator()
{
base::VolumeSegment< base::IntensityVolumeUInt16, void >& segment = grid->segmentAt( segCoord.x(), segCoord.y(), segCoord.z() );
base::IntensityVolumeUInt16* const volume = new base::IntensityVolumeUInt16( grid->maxSegmentSize );
- segment.setIntensityVolume( new base::Composition< base::IntensityVolumeUInt16 >( volume ) );
+ segment.setIntensities( new base::Composition< base::IntensityVolumeUInt16 >( volume ) );
/* Load segment volume data.
*/
@@ -156,7 +156,7 @@ void VolumeGridTestUInt8::test_parenthesisOperator1()
{
base::VolumeSegment< base::IntensityVolumeUInt8, void >& segment = grid->segmentAt( segCoord.x(), segCoord.y(), segCoord.z() );
base::IntensityVolumeUInt8* const volume = new base::IntensityVolumeUInt8( grid->maxSegmentSize );
- segment.setIntensityVolume( new base::Composition< base::IntensityVolumeUInt8 >( volume ) );
+ segment.setIntensities( new base::Composition< base::IntensityVolumeUInt8 >( volume ) );
/* Load segment volume data.
*/
@@ -210,7 +210,7 @@ void VolumeGridTestUInt8::test_parenthesisOperator2()
{
base::VolumeSegment< base::IntensityVolumeUInt8, void >& segment = grid->segmentAt( segCoord.x(), segCoord.y(), segCoord.z() );
base::IntensityVolumeUInt8* const volume = new base::IntensityVolumeUInt8( grid->maxSegmentSize );
- segment.setIntensityVolume( new base::Composition< base::IntensityVolumeUInt8 >( volume ) );
+ segment.setIntensities( new base::Composition< base::IntensityVolumeUInt8 >( volume ) );
/* Load segment volume data.
*/
diff --git a/test/UnitTests/VolumeGridHelperTest.cpp b/test/UnitTests/VolumeGridHelperTest.cpp
index f5576f51..5c189021 100644
--- a/test/UnitTests/VolumeGridHelperTest.cpp
+++ b/test/UnitTests/VolumeGridHelperTest.cpp
@@ -24,7 +24,7 @@ void verifyPartitioning( const TestedHelperType& helper )
{
CARNA_FOR_VECTOR3UI( coord, helper.grid().segmentCounts )
{
- const Carna::base::math::Vector3ui& size = helper.grid().segmentAt( coord ).intensityVolume().size;
+ const Carna::base::math::Vector3ui& size = helper.grid().segmentAt( coord ).intensities().size;
QCOMPARE( size.x() % 2, 0u );
QCOMPARE( size.y() % 2, 0u );
QCOMPARE( size.z() % 2, 0u );