X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLungGenericFilter.txx;h=64e7fb85f36513f3aa75febcddfc2a965bb2098f;hb=fdc97293cc66a4894a2c1c4f04f53d6473ab8ab2;hp=2fa40b124b965eb33f6dda6456f29e00c04f2ce0;hpb=e0464c9f7bdde185755d60e9dead188291fc3550;p=clitk.git diff --git a/segmentation/clitkExtractLungGenericFilter.txx b/segmentation/clitkExtractLungGenericFilter.txx index 2fa40b1..64e7fb8 100644 --- a/segmentation/clitkExtractLungGenericFilter.txx +++ b/segmentation/clitkExtractLungGenericFilter.txx @@ -54,7 +54,6 @@ void clitk::ExtractLungGenericFilter::SetArgsInfo(const ArgsInfoTy SetIOVerbose(mArgsInfo.verbose_flag); if (mArgsInfo.imagetypes_flag) this->PrintAvailableImageTypes(); if (mArgsInfo.input_given) AddInputFilename(mArgsInfo.input_arg); - if (mArgsInfo.patient_given) AddInputFilename(mArgsInfo.patient_arg); if (mArgsInfo.output_given) AddOutputFilename(mArgsInfo.output_arg); if (mArgsInfo.outputTrachea_given) AddOutputFilename(mArgsInfo.outputTrachea_arg); } @@ -69,39 +68,28 @@ template void clitk::ExtractLungGenericFilter::UpdateWithInputImageType() { // Mask & output image type - typedef itk::Image OutputImageType; typedef itk::Image MaskImageType; // Reading input typename ImageType::Pointer input = this->template GetInput(0); - typename MaskImageType::Pointer patient = this->template GetInput(1); // Create filter - typedef clitk::ExtractLungFilter FilterType; + 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); // 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); + typename MaskImageType::Pointer output = filter->GetOutput(); + this->template SetNextOutput(output); this->template SetNextOutput(filter->GetTracheaImage()); } //--------------------------------------------------------------------