]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeDescriptor.cpp
*** empty log message ***
[creaImageIO.git] / src2 / creaImageIOTreeDescriptor.cpp
index 6849b10bd6740f84cc36774381a551473c0c25ff..30c8b7aa8ba32fa15d9b81ba01d122bb23d7d485 100644 (file)
@@ -1,10 +1,11 @@
 #include <creaImageIOTreeDescriptor.h>
 #include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/replace.hpp>
 #include <creaImageIOSystem.h>
 #include <boost/filesystem.hpp>
 
 
-
+#include <fstream>
 
 
 namespace creaImageIO
@@ -18,6 +19,9 @@ namespace creaImageIO
     const unsigned int AttributeDescriptor::PRIVATE = 1;
     /// The attribute enters in unique identifier constitution 
     const unsigned int AttributeDescriptor::IDENTIFIER = 2;
+       /// The attribute can be edited
+       const unsigned int AttributeDescriptor::EDITABLE = 3;
+       /// the attribute describes the node
     const unsigned int AttributeDescriptor::LABEL = 4;
     //==================================================================
 
@@ -144,7 +148,7 @@ namespace creaImageIO
        // @param : file path                                                                           //
        // return : -                                                                                           //
        //////////////////////////////////////////////////////////////
-       void Descriptor::createDescriptorfromFile(std::string &i_name)
+       void Descriptor::createDescriptorfromFile(const std::string &i_name)
        {
                Clear();
                
@@ -205,8 +209,13 @@ namespace creaImageIO
                                        val2 >> std::hex >> element;
                                        Add(AttributeDescriptor( group,element,flag), ilevel);
                                }
-                               else // "O" means if user's own tag.
-                               {       
+
+                               else if(descriptors[0].find("#") != -1)
+                               {
+                                               // commented line continue to next line
+                               }
+                               else
+                               {       boost::algorithm::replace_all(descriptors[2],"_"," ");
                                        Add(AttributeDescriptor( descriptors[1].c_str(),descriptors[2].c_str(),flag), ilevel);
                                }
                        }