X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOTreeHandlerImageAdder.cpp;h=9c2d2974702b55b2895a509e36996d8c863e678d;hb=a00e6172593c713640aaa9bf1e61db6200231a0f;hp=290da65474741d59812ad591a705f3445e1601e6;hpb=b0843014c5482f70050fab8036c6780172e3b6c9;p=creaImageIO.git diff --git a/src2/creaImageIOTreeHandlerImageAdder.cpp b/src2/creaImageIOTreeHandlerImageAdder.cpp index 290da65..9c2d297 100644 --- a/src2/creaImageIOTreeHandlerImageAdder.cpp +++ b/src2/creaImageIOTreeHandlerImageAdder.cpp @@ -48,7 +48,7 @@ namespace creaImageIO unsigned int nbf = filenames.size(); std::vector::const_iterator i; - mSynchronizer->GetList(); + mSynchronizer->GetList(mCurrentDB); for (i=filenames.begin();i!=filenames.end();++i) { @@ -84,7 +84,7 @@ namespace creaImageIO mSynchronizer->InsertAddOp(directory,rec.str(),"0",mCurrentDB); std::string addKey=mSynchronizer->GetAttribute("ADD_KEY","ADD_OPS","PATH",directory,mCurrentDB); mTreeHandler->BeginTransaction(); - mSynchronizer->GetList(); + mSynchronizer->GetList(mCurrentDB); AddDirectoryRecursor( directory, recurse, addKey ); int nFiles=GetProgress().GetNumberAddedFiles(); @@ -101,7 +101,22 @@ namespace creaImageIO std::map< std::string, std::string> attr; mTreeHandler->GetTree().GetDescriptor().BuildAttributeMap(attr); + mReader.ReadAttributes(filename,attr); + //// TO DO Create a function to test if the SOP Instance ID (0008,0018) is not already on DB + //// test befor if this attr is present on DB if not don't perform the test!!! + //bool bSOPIID = false; + //std::map::iterator it_att = attr.begin(); + //for(; it_att != attr.end(); it_att++) + //{ + // if (it_att->first == "D0008_0018") + // { + // bSOPIID = mTreeHandler->TestSOPIID(it_attr->second); + // break; + // } + //} + //if(bSOPIID) + // return; int lev = mTreeHandler->AddBranch(attr);