* \brief Class bbtk::ThresholdImageView .
*/
-
#include "ThresholdImageView.h"
-
-
//=========================================================================
ThresholdImageView::ThresholdImageView( )
{
//----------------------------------------------------------------------------
void ThresholdImageView::SetImage(vtkImageData* image)
{
- printf("ThresholdImageView::SetImage %p\n", image);
_image = image;
}
range[1]=255;
}
-
int minTot = floor (range[0]);
int maxTot = ceil (range[1]);
-
int minVal = floor (_minValue);
int maxVal = floor (_maxValue);
-
if (!_actorPresent)
{
if (_imageReslicer==NULL)
baseView->GetRenderer()->AddActor( _thresholdActor );
_actorPresent = true;
}
-
else
{
_imageReslicer->SetResliceAxesOrigin(0,0,z);
_thresholdTable->SetTableValue(i, 1.0, 1.0, 1.0, 0); //transparent
}
}
-
_thresholdTable->Build( );
_thresholdMapper->SetLookupTable( _thresholdTable );
_thresholdMapper->SetInput( img );
{
_thresholdActor->InterpolateOn( );
}
-
else
{
_thresholdActor->InterpolateOff( );
- }
-
-//EED _theViewPanel->RefreshInterface();
+ }
}
}
{
_thresholdActor->SetOpacity(opacity*0.1);
}
-
-//EED _theViewPanel->RefreshInterface();
}
//----------------------------------------------------------------------------
wxVtkBaseView * baseView = _baseView;
baseView->GetRenderer()->RemoveActor( _thresholdActor );
_actorPresent = false;
- }
-
-//EED _theViewPanel->RefreshInterface();
+ }
}