From: dsarrut Date: Wed, 12 May 2010 06:20:14 +0000 (+0000) Subject: - change FG/BG to 0-255 value X-Git-Tag: v1.2.0~661 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4abdf39f64878b3ac9c42aee7e0a77dbf1b095ee;p=clitk.git - change FG/BG to 0-255 value --- 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(); } //------------------------------------------------------------------------------