X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLungGenericFilter.txx;h=2fa40b124b965eb33f6dda6456f29e00c04f2ce0;hb=fa16a72aba05d2d5ac4d96a7a42627ef6d2b1df2;hp=18fc2cfa2bc161d6771f493b5fd9af445a2504a3;hpb=e008d74b0ecdc4ca2eaae8c429901a78f9ef5c31;p=clitk.git diff --git a/segmentation/clitkExtractLungGenericFilter.txx b/segmentation/clitkExtractLungGenericFilter.txx index 18fc2cf..2fa40b1 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,8 +79,12 @@ 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->SetStopOnError(this->GetStopOnError()); filter->SetArgsInfo(mArgsInfo); filter->SetInput(input); filter->SetInputPatientMask(patient, mArgsInfo.patientBG_arg); @@ -97,8 +102,7 @@ void clitk::ExtractLungGenericFilter::UpdateWithInputImageType() // 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()); } //--------------------------------------------------------------------