]> Creatis software - clitk.git/blobdiff - segmentation/clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
Add option do display required structures
[clitk.git] / segmentation / clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx
index 6db7c4b934dee61ba449fc65164c4838159a09c8..9732057817f0dab2de41c59a2a49c96810c62c8d 100644 (file)
@@ -26,6 +26,7 @@ FilterWithAnatomicalFeatureDatabaseManagement()
   m_AFDB = NULL; 
   SetAFDBFilename("default.afdb");
   SetAFDBPath("./");
+  DisplayUsedStructuresOnlyFlagOff();
 }
 //--------------------------------------------------------------------
 
@@ -63,3 +64,25 @@ clitk::AnatomicalFeatureDatabase::Pointer clitk::FilterWithAnatomicalFeatureData
   return m_AFDB;
 }
 //--------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------
+void clitk::FilterWithAnatomicalFeatureDatabaseManagement::
+AddUsedStructures(std::string station, std::string structure)
+{
+  if (!GetDisplayUsedStructuresOnlyFlag()) return;
+  std::cout << station << "\t" << structure;
+  bool founded = true;
+  bool tag = GetAFDB()->TagExist(structure);
+  if (tag) {
+    typedef typename itk::Image<uchar, 3> ImageType;
+    founded = GetAFDB()->CheckImage<ImageType>(structure);
+    if (!founded) { 
+      std::cout << " \t Image not exist in DB ";
+      std::cout << "<" << GetAFDB()->GetTagValue(structure) << "> ";
+    }
+  }
+  if (!tag) std::cout << " \t Tag not found in DB";
+  std::cout << std::endl;
+}
+//--------------------------------------------------------------------