]> Creatis software - clitk.git/blobdiff - segmentation/clitkExtractMediastinumGenericFilter.txx
add smooth option to extract bones
[clitk.git] / segmentation / clitkExtractMediastinumGenericFilter.txx
index 5a2cead88c52d7d32527c9e7e3f66bdd3fec7f45..8632222cbec0b974a1926566e8d8018344a7a652 100644 (file)
@@ -56,6 +56,7 @@ void clitk::ExtractMediastinumGenericFilter<ArgsInfoType>::SetArgsInfo(const Arg
   if (mArgsInfo.patient_given) AddInputFilename(mArgsInfo.patient_arg);
   if (mArgsInfo.lung_given) AddInputFilename(mArgsInfo.lung_arg);
   if (mArgsInfo.bones_given) AddInputFilename(mArgsInfo.bones_arg);
+  if (mArgsInfo.trachea_given) AddInputFilename(mArgsInfo.trachea_arg);
   if (mArgsInfo.output_given)  AddOutputFilename(mArgsInfo.output_arg);
 }
 //--------------------------------------------------------------------
@@ -70,8 +71,9 @@ void clitk::ExtractMediastinumGenericFilter<ArgsInfoType>::UpdateWithInputImageT
 { 
   // Reading input
   typename ImageType::Pointer patient = this->template GetInput<ImageType>(0);
-  typename ImageType::Pointer lung = this->template GetInput<ImageType>(1);
-  typename ImageType::Pointer bones = this->template GetInput<ImageType>(2);
+  typename ImageType::Pointer lung    = this->template GetInput<ImageType>(1);
+  typename ImageType::Pointer bones   = this->template GetInput<ImageType>(2);
+  typename ImageType::Pointer trachea = this->template GetInput<ImageType>(3);
 
   // Create filter
   typedef clitk::ExtractMediastinumFilter<ImageType> FilterType;
@@ -81,6 +83,7 @@ void clitk::ExtractMediastinumGenericFilter<ArgsInfoType>::UpdateWithInputImageT
   filter->SetInputPatientLabelImage(patient, mArgsInfo.patientBG_arg);
   filter->SetInputLungLabelImage(lung, mArgsInfo.lungBG_arg, mArgsInfo.lungRight_arg, mArgsInfo.lungLeft_arg);
   filter->SetInputBonesLabelImage(bones, mArgsInfo.bonesBG_arg);
+  filter->SetInputTracheaLabelImage(trachea, mArgsInfo.tracheaBG_arg);
   filter->SetArgsInfo(mArgsInfo);
 
   // Go !