]> Creatis software - clitk.git/blobdiff - segmentation/clitkExtractAirwaysTreeInfoFilter.h
corrections in mid-P scripts
[clitk.git] / segmentation / clitkExtractAirwaysTreeInfoFilter.h
index 220d8cea5c9ea5d679bf84eb87491c356d1d1148..f22b724223e67e87d591fe8701c2f4daa3bdd7bd 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to: 
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-  ======================================================================-====*/
+  ===========================================================================**/
 
 #ifndef CLITKEXTRACTAIRWAYTREEINFOSFILTER_H
 #define CLITKEXTRACTAIRWAYTREEINFOSFILTER_H
@@ -53,8 +53,10 @@ namespace clitk {
       _l1 = l1;
       _l2 = l2;
     }
+
     IndexType index;
     PointType point;
+    double weight;
     PixelType l;
     PixelType l1;
     PixelType l2;
@@ -109,14 +111,26 @@ namespace clitk {
     typedef typename InternalImageType::Pointer                      InternalImagePointer;
     typedef typename InternalImageType::IndexType                    InternalIndexType;
     typedef LabelizeParameters<InternalPixelType>                    LabelParamType;
-    
+
+    // Data Structures for trees 
+    struct FullTreeNodeType {
+      ImageIndexType index;
+      ImagePointType point;
+      double weight;
+    };
+    struct StructuralTreeNodeType {
+      ImageIndexType index;
+      ImagePointType point;
+      double weight;
+    };
+    typedef tree<FullTreeNodeType> FullTreeType;
+    typedef tree<StructuralTreeNodeType> StructuralTreeType;
+    FullTreeType mFullSkeletonTree; 
+    StructuralTreeType mStructuralSkeletonTree;
+
     /** Connect inputs */
     void SetInput(const ImageType * image);
 
-    // Set all options at a time
-    template<class ArgsInfoType>
-      void SetArgsInfo(ArgsInfoType arg);
-
     // Background / Foreground
     itkGetConstMacro(BackgroundValue, ImagePixelType);
     itkGetConstMacro(ForegroundValue, ImagePixelType);
@@ -148,6 +162,10 @@ namespace clitk {
     virtual void GenerateData();
 
     TreeType m_SkeletonTree;
+    void TrackFromThisIndex2(ImageIndexType index, ImagePointer skeleton, 
+                            ImagePixelType label, 
+                            typename FullTreeType::iterator currentNode, 
+                             typename StructuralTreeType::iterator currentSNode);
     void TrackFromThisIndex(std::vector<BifurcationType> & listOfBifurcations, 
                             ImagePointer skeleton, 
                             ImageIndexType index,