//------------------------------------------------------------------------------
void vvToolBinarize::Initialize()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
SetToolName("Binarize");
SetToolMenuName("Binarize");
SetToolIconFilename(":/common/icons/binarize.png");
:vvToolWidgetBase(parent,f),
vvToolBase<vvToolBinarize>(parent),
Ui::vvToolBinarize()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
// GUI Initialization
Ui_vvToolBinarize::setupUi(mToolWidget);
mInteractiveDisplayIsEnabled = mCheckBoxInteractiveDisplay->isChecked();
//------------------------------------------------------------------------------
vvToolBinarize::~vvToolBinarize()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void vvToolBinarize::InteractiveDisplayToggled(bool b)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
mInteractiveDisplayIsEnabled = b;
if (!mInteractiveDisplayIsEnabled) {
RemoveVTKObjects();
//------------------------------------------------------------------------------
void vvToolBinarize::RemoveVTKObjects()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
for(unsigned int i=0; i<mImageContour.size(); i++) {
mImageContour[i]->HideActors();
mImageContourLower[i]->HideActors();
//------------------------------------------------------------------------------
bool vvToolBinarize::close()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
// RemoveVTKObjects();
return vvToolWidgetBase::close();
}
//------------------------------------------------------------------------------
void vvToolBinarize::closeEvent(QCloseEvent *event)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
RemoveVTKObjects();
event->accept();
}
//------------------------------------------------------------------------------
void vvToolBinarize::reject()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
// DD("vvToolBinarize::reject");
RemoveVTKObjects();
return vvToolWidgetBase::reject();
//------------------------------------------------------------------------------
void vvToolBinarize::enableLowerThan(bool b)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
if (!b) {
mThresholdSlider1->resetMaximum();
for(unsigned int i=0; i<mImageContour.size(); i++) {
//------------------------------------------------------------------------------
void vvToolBinarize::useFGBGtoggled(bool)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
if (!mCheckBoxUseBG->isChecked() && !mCheckBoxUseFG->isChecked())
mCheckBoxUseBG->toggle();
}
// DD(m.size());
// }
void vvToolBinarize::InputIsSelected(vvSlicerManager * m)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
mCurrentSlicerManager = m;
// Specific for this gui
mImageContour.push_back(vvImageContour::New());
mImageContour[i]->SetSlicer(mCurrentSlicerManager->GetSlicer(i));
mImageContour[i]->SetColor(1.0, 0.0, 0.0);
- mImageContour[i]->SetDepth(100); // to be in front of (whe used with ROI tool)
+ mImageContour[i]->SetDepth(0); // to be in front of (whe used with ROI tool)
mImageContourLower.push_back(vvImageContour::New());
mImageContourLower[i]->SetSlicer(mCurrentSlicerManager->GetSlicer(i));
mImageContourLower[i]->SetColor(0.0, 0.0, 1.0);
//------------------------------------------------------------------------------
void vvToolBinarize::UpdateOrientation(int slicer,int orientation)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
Update(slicer);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void vvToolBinarize::UpdateSlice(int slicer,int slices)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
Update(slicer);
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void vvToolBinarize::Update(int slicer)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
if (!mInteractiveDisplayIsEnabled) return;
if (!mCurrentSlicerManager) close();
mImageContour[slicer]->Update(mThresholdSlider1->GetValue());
//------------------------------------------------------------------------------
void vvToolBinarize::GetArgsInfoFromGUI()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
/* //KEEP THIS FOR READING GGO FROM FILE
int argc=1;
//------------------------------------------------------------------------------
void vvToolBinarize::apply()
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
if (!mCurrentSlicerManager) close();
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
GetArgsInfoFromGUI();
//------------------------------------------------------------------------------
void vvToolBinarize::valueChangedT2(double v)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
// DD("valueChangedT2");
if (mRadioButtonLowerThan->isChecked()) {
mThresholdSlider1->SetMaximum(v);
//------------------------------------------------------------------------------
void vvToolBinarize::valueChangedT1(double v)
-{ cout << __func__ << endl;
+{ //out << __func__ << endl;
// DD("valueChangedT1");
if (!mCurrentSlicerManager) close();
mThresholdSlider2->SetMinimum(v);