Commit 41a687ef authored by Tobias Neeb's avatar Tobias Neeb
Browse files

[ADD #736] extend debug-information about triangular widgets

parent d82e0762
......@@ -177,8 +177,8 @@ namespace PROPERTY_TYPE_HELPER
size_t numColors = tf.numBoxWidgets();
for( size_t i = 0; i < numColors; ++i )
{
double isoX = tf.getIsovalueX( i );
double isoY = tf.getIsovalueY( i );
double isoX = tf.getIsovalueX( BOX, i );
double isoY = tf.getIsovalueY( BOX, i );
double width = tf.getWidth( i );
double height = tf.getHeight( i );
WColor c = tf.getColor( i );
......
......@@ -93,6 +93,7 @@ void WMTransferFunction2D::properties()
WTransferFunction2D tf;
tf.addBoxWidget( 0., 0., .167, .167, WColor( 1., 0., 0., 0.1 ) );
//tf.WTransferFunction2D::addTriangleWidget(0.0, 0.0, .167, .167, WColor(1., 0., 0., 0.1));
m_transferFunction = m_properties->addProperty( "2D Transfer Function",
"The 2D transfer function editor. "
"The Origin (0, 0) is in the bottom left corner. "
......@@ -142,6 +143,7 @@ void WMTransferFunction2D::moduleMain()
bool tfChanged = m_transferFunction->changed();
WTransferFunction2D tf = m_transferFunction->get( true );
debugLog() << "Current transfer function " << tf.numBoxWidgets() << " box widgets.";
debugLog() << "Current transfer function " << tf.numTriangleWidgets() << " triangle widgets.";
if( m_inputDataSet0->updated() || m_inputDataSet1->updated() )
{
std::shared_ptr< WDataSetSingle > dataSet0 = m_inputDataSet0->getData();
......@@ -184,7 +186,7 @@ void WMTransferFunction2D::moduleMain()
wlog::debug( "WMTransferFunction2D" ) << "tf changed";
// debugLog() << "resampling transfer function";
unsigned int resolution = m_resolution->get( true );
std::shared_ptr< std::vector<unsigned char> > data( new std::vector<unsigned char>( resolution * resolution * 4 ) );
std::shared_ptr< std::vector<unsigned char>> data( new std::vector<unsigned char>( resolution * resolution * 4 ) );
tf.setOpacityScale( m_opacityScale->get( true ) );
// Get the 2D texture from the TF
tf.sample2DTransferFunction( &( *data )[0], resolution, resolution );
......
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