X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLungGenericFilter.txx;h=74317ed55f03f360edc78ccfb9516bdc77835454;hb=22681675b0ed087fd02fbd94968d5ea5251f5408;hp=18fc2cfa2bc161d6771f493b5fd9af445a2504a3;hpb=e008d74b0ecdc4ca2eaae8c429901a78f9ef5c31;p=clitk.git diff --git a/segmentation/clitkExtractLungGenericFilter.txx b/segmentation/clitkExtractLungGenericFilter.txx index 18fc2cf..74317ed 100644 --- a/segmentation/clitkExtractLungGenericFilter.txx +++ b/segmentation/clitkExtractLungGenericFilter.txx @@ -26,6 +26,7 @@ template clitk::ExtractLungGenericFilter::ExtractLungGenericFilter(): ImageToImageGenericFilter("ExtractLung") { + this->SetFilterBase(NULL); // Default values cmdline_parser_clitkExtractLung_init(&mArgsInfo); InitializeImageType<3>(); @@ -78,6 +79,9 @@ void clitk::ExtractLungGenericFilter::UpdateWithInputImageType() // Create filter typedef clitk::ExtractLungFilter FilterType; typename FilterType::Pointer filter = FilterType::New(); + + // Set the filter (needed for example for threaded monitoring) + this->SetFilterBase(filter); // Set global Options filter->SetArgsInfo(mArgsInfo); @@ -87,18 +91,10 @@ void clitk::ExtractLungGenericFilter::UpdateWithInputImageType() // Go ! filter->Update(); - // Check if error - if (filter->HasError()) { - SetLastError(filter->GetLastError()); - // No output - return; - } - // Write/Save results typename OutputImageType::Pointer output = filter->GetOutput(); this->template SetNextOutput(output); - if (mArgsInfo.outputTrachea_given) - this->template SetNextOutput(filter->GetTracheaImage()); + this->template SetNextOutput(filter->GetTracheaImage()); } //--------------------------------------------------------------------