From: srit Date: Fri, 10 Sep 2010 12:38:23 +0000 (+0000) Subject: Try to adapt the filter to Jef's clitk2 solution. X-Git-Tag: v1.2.0~396 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7c4ea05111826e62fe6efc7886dd9b034abf7cd1;p=clitk.git Try to adapt the filter to Jef's clitk2 solution. --- diff --git a/segmentation/clitkExtractPatientFilter.txx b/segmentation/clitkExtractPatientFilter.txx index cfc2ab2..e9dd6fe 100644 --- a/segmentation/clitkExtractPatientFilter.txx +++ b/segmentation/clitkExtractPatientFilter.txx @@ -194,10 +194,10 @@ GenerateOutputInformation() { typedef itk::BinaryThresholdImageFilter iBinarizeFilterType; typename iBinarizeFilterType::Pointer binarizeFilter2 = iBinarizeFilterType::New(); binarizeFilter2->SetInput(working_image); - binarizeFilter2->SetLowerThreshold(this->GetForegroundValue()); - binarizeFilter2->SetUpperThreshold(this->GetForegroundValue()); - binarizeFilter2 ->SetInsideValue(this->GetBackgroundValue()); - binarizeFilter2 ->SetOutsideValue(this->GetForegroundValue()); + binarizeFilter2->SetLowerThreshold(GetFirstKeep()); + binarizeFilter2->SetUpperThreshold(GetLastKeep()); + binarizeFilter2 ->SetInsideValue(0); + binarizeFilter2 ->SetOutsideValue(1); // binarizeFilter2 ->Update(); // NEEDED ? typename ConnectFilterType::Pointer connectFilter2 = ConnectFilterType::New(); @@ -231,19 +231,6 @@ GenerateOutputInformation() { StopCurrentStep(working_image); } - //-------------------------------------------------------------------- - //-------------------------------------------------------------------- - StartNewStep("Keep patient's labels"); - typename iBinarizeFilterType::Pointer binarizeFilter3 = iBinarizeFilterType::New(); - binarizeFilter3->SetInput(working_image); - binarizeFilter3->SetLowerThreshold(GetFirstKeep()); - binarizeFilter3->SetUpperThreshold(GetLastKeep()); - binarizeFilter3 ->SetInsideValue(this->GetForegroundValue()); - binarizeFilter3 ->SetOutsideValue(this->GetBackgroundValue()); - binarizeFilter3->Update(); - working_image = binarizeFilter3->GetOutput(); - StopCurrentStep(working_image); - //-------------------------------------------------------------------- //-------------------------------------------------------------------- // [Optional]