From d19739229c921a138efd284127266b42cb20bd17 Mon Sep 17 00:00:00 2001 From: dsarrut Date: Wed, 30 Jun 2010 05:56:39 +0000 Subject: [PATCH] FG and BG values --- common/clitkDicomRT_ROI.cxx | 18 ++++++++++++++++++ common/clitkDicomRT_ROI.h | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/common/clitkDicomRT_ROI.cxx b/common/clitkDicomRT_ROI.cxx index fb7b0ca..e9cc0d5 100644 --- a/common/clitkDicomRT_ROI.cxx +++ b/common/clitkDicomRT_ROI.cxx @@ -29,6 +29,8 @@ clitk::DicomRT_ROI::DicomRT_ROI() mColor.resize(3); mColor[0] = mColor[1] = mColor[2] = 0; mMeshIsUpToDate = false; + mBackgroundValue = 0; + mForegroundValue = 1; } //-------------------------------------------------------------------- @@ -110,6 +112,22 @@ double clitk::DicomRT_ROI::GetBackgroundValueLabelImage() const //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +void clitk::DicomRT_ROI::SetForegroundValueLabelImage(double bg) +{ + mForegroundValue = bg; +} +//-------------------------------------------------------------------- + + +//-------------------------------------------------------------------- +double clitk::DicomRT_ROI::GetForegroundValueLabelImage() const +{ + return mForegroundValue; +} +//-------------------------------------------------------------------- + + //-------------------------------------------------------------------- void clitk::DicomRT_ROI::Read(std::map & rois, gdcm::SQItem * item) { diff --git a/common/clitkDicomRT_ROI.h b/common/clitkDicomRT_ROI.h index 5a30df8..77b5204 100644 --- a/common/clitkDicomRT_ROI.h +++ b/common/clitkDicomRT_ROI.h @@ -52,6 +52,9 @@ namespace clitk { double GetBackgroundValueLabelImage() const; void SetBackgroundValueLabelImage(double bg); + double GetForegroundValueLabelImage() const; + void SetForegroundValueLabelImage(double bg); + void SetImage(vvImage * im); protected: @@ -65,6 +68,7 @@ namespace clitk { bool mMeshIsUpToDate; vvImage::Pointer mImage; double mBackgroundValue; + double mForegroundValue; }; //-------------------------------------------------------------------- -- 2.47.1