]> Creatis software - clitk.git/blobdiff - tools/clitkAffineTransformGenericFilter.h
Add tool to convert Elastix param into matrix file
[clitk.git] / tools / clitkAffineTransformGenericFilter.h
index ebb17b5df675eed4b1c3d0b6d447d2b73f3309b0..39506326f572a2bb614da44524c64547879eda41 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 clitkAffineTransformGenericFilter_h
 #define clitkAffineTransformGenericFilter_h
 
@@ -87,6 +87,11 @@ namespace clitk
     //----------------------------------------  
     void Update();
 
+    template<unsigned int Dimension, class PixelType>
+      static
+      typename itk::Matrix<double, Dimension+1, Dimension+1>
+      createMatrixFromElastixFile(std::vector<std::string> & filename, bool verbose=true);
+
   protected:
 
     //----------------------------------------  
@@ -103,6 +108,10 @@ namespace clitk
     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndPixelType();
     template <unsigned int Dimension, class PixelType>  void UpdateWithDimAndVectorType();
 
+    static bool GetElastixValueFromTag(std::ifstream & is, std::string tag, std::string & value); 
+    static void GetValuesFromValue(const std::string & s, 
+                                   std::vector<std::string> & values);
+
     //----------------------------------------  
     // Data members
     //----------------------------------------