X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLungFilter.txx;h=4baee45296f5555d49b1748195b19d3757106e13;hb=c5669e2c629b8248e22d8892c6576ada7a14cc25;hp=55e9e6cbcefc0efa015a2f6047a886917f4904f5;hpb=84aa70d26f13d3a436a241c1ce1ac554c25f3146;p=clitk.git diff --git a/segmentation/clitkExtractLungFilter.txx b/segmentation/clitkExtractLungFilter.txx index 55e9e6c..4baee45 100644 --- a/segmentation/clitkExtractLungFilter.txx +++ b/segmentation/clitkExtractLungFilter.txx @@ -164,8 +164,8 @@ void clitk::ExtractLungFilter:: GenerateOutputInformation() { - Superclass::GenerateOutputInformation(); // Needed ?? - this->GetOutput(0)->SetRequestedRegion(this->GetOutput(0)->GetLargestPossibleRegion()); + Superclass::GenerateOutputInformation(); + //this->GetOutput(0)->SetRequestedRegion(this->GetOutput(0)->GetLargestPossibleRegion()); // Get input pointers patient = dynamic_cast(itk::ProcessObject::GetInput(1)); @@ -187,6 +187,13 @@ GenerateOutputInformation() //-------------------------------------------------------------------- //-------------------------------------------------------------------- StartNewStepOrStop("Remove Air"); + // Check threshold + if (m_UseLowerThreshold) { + if (m_LowerThreshold > m_UpperThreshold) { + this->SetLastError("ERROR: lower threshold cannot be greater than upper threshold."); + return; + } + } // Threshold to get air typedef itk::BinaryThresholdImageFilter InputBinarizeFilterType; typename InputBinarizeFilterType::Pointer binarizeFilter=InputBinarizeFilterType::New(); @@ -458,7 +465,7 @@ GenerateOutputInformation() --it; } if (it.IsAtEnd()) { - this->SetLastError("ERROR: first point in the skeleton not found ! Abord"); + this->SetLastError("ERROR: first point in the skeleton not found ! Abort"); return; } DD(skeleton->GetLargestPossibleRegion().GetIndex());