From 4abdf39f64878b3ac9c42aee7e0a77dbf1b095ee Mon Sep 17 00:00:00 2001 From: dsarrut Date: Wed, 12 May 2010 06:20:14 +0000 Subject: [PATCH] - change FG/BG to 0-255 value --- vv/vvToolBinarize.cxx | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/vv/vvToolBinarize.cxx b/vv/vvToolBinarize.cxx index ae06718..6d85154 100644 --- a/vv/vvToolBinarize.cxx +++ b/vv/vvToolBinarize.cxx @@ -175,10 +175,17 @@ void vvToolBinarize::InputIsSelected(vvSlicerManager * m) { mFGSlider->SetImage(mCurrentImage); mBGSlider->SetImage(mCurrentImage); // DD(mCurrentSlicerManager->GetFileName().c_str()); - mFGSlider->SetMaximum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMax()); - mFGSlider->SetMinimum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMin()); - mBGSlider->SetMaximum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMax()); - mBGSlider->SetMinimum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMin()); + // mFGSlider->SetMaximum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMax()); +// mFGSlider->SetMinimum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMin()); +// mBGSlider->SetMaximum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMax()); +// mBGSlider->SetMinimum(mCurrentImage->GetFirstVTKImageData()->GetScalarTypeMin()); + + // Output is uchar ... + mFGSlider->SetMaximum(255); + mFGSlider->SetMinimum(0); + mBGSlider->SetMaximum(255); + mBGSlider->SetMinimum(0); + mFGSlider->SetValue(1); mBGSlider->SetValue(0); mFGSlider->SetSingleStep(1); @@ -221,14 +228,10 @@ void vvToolBinarize::InputIsSelected(vvSlicerManager * m) { void vvToolBinarize::UpdateSlice(int slicer,int slices) { if (!mInteractiveDisplayIsEnabled) return; if (!mCurrentSlicerManager) close(); - for(int i=0;iNumberOfSlicers(); i++) { - // DD(i); - mImageContour[i]->update(mThresholdSlider1->GetValue()); - if (mRadioButtonLowerThan->isChecked()) - mImageContourLower[i]->update(mThresholdSlider2->GetValue()); - - } - mCurrentSlicerManager->Render(); + mImageContour[slicer]->update(mThresholdSlider1->GetValue()); + if (mRadioButtonLowerThan->isChecked()) + mImageContourLower[slicer]->update(mThresholdSlider2->GetValue()); + // mCurrentSlicerManager->GetSlicer(slicer)->Render(); } //------------------------------------------------------------------------------ -- 2.47.1