From e13ea6551e8721b11998dc33ddccf3f89458f173 Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Thu, 2 Jul 2009 08:27:45 +0000 Subject: [PATCH] Remove timestamp_database and timestamp files (now management only with maintenance_database)-> Speed up "add directory" action. --- src2/CMakeLists.txt | 1 - src2/creaImageIOGimmick.cpp | 59 +------- src2/creaImageIOGimmick.h | 11 +- src2/creaImageIOSynchron.cpp | 40 +++++- src2/creaImageIOSynchron.h | 6 + src2/creaImageIOTreeHandlerImageAdder.cpp | 27 +--- src2/creaImageIOWxGimmickView.cpp | 65 ++++++++- src2/creaImageIOWxGimmickView.h | 162 +++------------------- src2/creaImageIOWxTreeView.cpp | 108 --------------- src2/creaImageIOWxTreeView.h | 4 - 10 files changed, 137 insertions(+), 346 deletions(-) diff --git a/src2/CMakeLists.txt b/src2/CMakeLists.txt index 3fe2c57..56eb3c8 100644 --- a/src2/CMakeLists.txt +++ b/src2/CMakeLists.txt @@ -34,7 +34,6 @@ SET( SRCS # creaImageIOGimmick creaImageIOSynchron - creaImageIOTimestampDatabaseHandler creaImageIOListener creaImageIOPACSConnection diff --git a/src2/creaImageIOGimmick.cpp b/src2/creaImageIOGimmick.cpp index 5549175..f5d2110 100644 --- a/src2/creaImageIOGimmick.cpp +++ b/src2/creaImageIOGimmick.cpp @@ -3,7 +3,7 @@ #include #include #include -#include "io.h" +//#include "io.h" #ifndef PATH_MAX // If not defined yet : do it # define PATH_MAX 2048 #endif @@ -42,7 +42,6 @@ namespace creaImageIO //============================================================== void Gimmick::Initialize(const std::string& path) { - mDescriptorPath=path; Initialize(); } @@ -72,35 +71,7 @@ namespace creaImageIO //Add additional DB from user Settings addDBSettings(); - // Creates files and directories database - mTimestampDatabase = new TimestampDatabaseHandler(GetTimestampDatabasePath()); - // Create or open local database - if (! boost::filesystem::exists( GetTimestampDatabasePath() ) ) - { - std::string mess = "Timestamp database '"; - mess += GetTimestampDatabasePath(); - mess += "' does not exist : creating it"; - GimmickMessage(1,mess<Create() ) - { - GimmickError("ERROR CREATING '"<Open() ) - { - GimmickError("ERROR OPENING '"<second; } - delete mTimestampDatabase; } //============================================================== @@ -230,21 +200,7 @@ namespace creaImageIO return mLocalDatabasePath; } - //================================================================ - //================================================================ - const std::string& Gimmick::GetTimestampDatabasePath() - { - if (mTimestampDatabasePath.size()==0) - { - mTimestampDatabasePath = GetUserSettingsDirectory(); - mTimestampDatabasePath += "Shared/gimmick/timestamp_database.sqlite3"; - boost::algorithm::replace_all( mTimestampDatabasePath, - INVALID_FILE_SEPARATOR , - VALID_FILE_SEPARATOR); - } - return mTimestampDatabasePath; - } //======================================================================== //======================================================================== @@ -323,12 +279,6 @@ namespace creaImageIO return i->second; } - //======================================================================== - ///Returns the timestamp database handler - TimestampDatabaseHandler* Gimmick::GetTimestampDatabase() const - { - return mTimestampDatabase; - } //======================================================================== @@ -340,7 +290,6 @@ namespace creaImageIO mImageAdder.SetCurrentDatabase(d); mImageAdder.SetTreeHandler(GetTreeHandler(d)); - mImageAdder.SetTimestampHandler(mTimestampDatabase); mImageAdder.SetSynchronizer(mSynchronizer); mImageAdder.AddFiles(filenames); @@ -358,7 +307,6 @@ namespace creaImageIO TreeHandler * handler=GetTreeHandler(d); mImageAdder.SetCurrentDatabase(d); mImageAdder.SetTreeHandler(handler); - mImageAdder.SetTimestampHandler(mTimestampDatabase); mImageAdder.SetSynchronizer(mSynchronizer); mImageAdder.AddDirectory(f,recurse); } @@ -371,7 +319,6 @@ namespace creaImageIO { mImageAdder.SetCurrentDatabase(d); mImageAdder.SetSynchronizer(mSynchronizer); - mTimestampDatabase->RemoveNode("PATH",node,d); mImageAdder.RemoveFile(node); } //======================================================================== @@ -383,7 +330,6 @@ namespace creaImageIO TreeHandler * handler=GetTreeHandler(d); mImageAdder.SetCurrentDatabase(d); mImageAdder.SetTreeHandler(handler); - mImageAdder.SetTimestampHandler(mTimestampDatabase); mImageAdder.SetSynchronizer(mSynchronizer); mImageAdder.CopyFiles(filenames, mSettings->getValue(SETTINGS_COPY_PATH)); } @@ -395,7 +341,6 @@ namespace creaImageIO TreeHandler * handler=GetTreeHandler(d); mImageAdder.SetCurrentDatabase(d); mImageAdder.SetTreeHandler(handler); - mImageAdder.SetTimestampHandler(mTimestampDatabase); mImageAdder.SetSynchronizer(mSynchronizer); return mImageAdder.Synchronize(repair, checkAttributes); } @@ -424,7 +369,6 @@ namespace creaImageIO TreeHandler * handler=GetTreeHandler(d); mImageAdder.SetCurrentDatabase(d); mImageAdder.SetTreeHandler(handler); - mImageAdder.SetTimestampHandler(mTimestampDatabase); mImageAdder.SetSynchronizer(mSynchronizer); mImageAdder.GetAttributes(params, filename, results); } @@ -447,7 +391,6 @@ namespace creaImageIO mImageAdder.SetTreeHandler(it->second); mImageAdder.DeleteDriveFromMainDB(drive); } - mImageAdder.SetTimestampHandler(mTimestampDatabase); mImageAdder.SetSynchronizer(mSynchronizer); mImageAdder.DeleteDriveFromOtherDB(drive); } diff --git a/src2/creaImageIOGimmick.h b/src2/creaImageIOGimmick.h index 41e6b3b..8085f69 100644 --- a/src2/creaImageIOGimmick.h +++ b/src2/creaImageIOGimmick.h @@ -3,7 +3,6 @@ #include #include -#include #include #include @@ -125,9 +124,7 @@ namespace creaImageIO /// Returns the TreeHandler with a given name TreeHandler* GetTreeHandler(const std::string& name) const; - /// Returns the TimestampDatabase - TimestampDatabaseHandler* GetTimestampDatabase() const; - /// + /// SQLiteTreeHandler* GetLocalDatabase() { return mLocalDatabase; } const SQLiteTreeHandler* GetLocalDatabase() const @@ -156,21 +153,19 @@ namespace creaImageIO const std::string& GetUserSettingsDirectory(); void CreateUserSettingsDirectory(); const std::string& GetLocalDatabasePath(); - const std::string& GetTimestampDatabasePath(); + //============================================= private: SQLiteTreeHandler* mLocalDatabase; - TimestampDatabaseHandler* mTimestampDatabase; - TreeHandlerMapType mTreeHandlerMap; + TreeHandlerMapType mTreeHandlerMap; Synchronizer* mSynchronizer; std::string mCurrentDirectory; std::string mHomeDirectory; std::string mUserSettingsDirectory; std::string mLocalDatabasePath; - std::string mTimestampDatabasePath; Settings *mSettings; TreeHandlerImageAdder mImageAdder; }; diff --git a/src2/creaImageIOSynchron.cpp b/src2/creaImageIOSynchron.cpp index 74e9e98..0748a86 100644 --- a/src2/creaImageIOSynchron.cpp +++ b/src2/creaImageIOSynchron.cpp @@ -377,5 +377,43 @@ namespace creaImageIO sql += "';"; UPDATESYNCDB(sql); } -} + + +///////////////////////////////////////////////////////////////////////////////////////////////// + // get the files name to ignore for a add operation synchronization + // @param : the add key + //@result : list (path) of ignore files + ///////////////////////////////////////////////////////////////////////////////////////////////// + void Synchronizer::GetList() + { + mList.clear(); + std::vector i_names; + std::string query = "SELECT PATH, REMOVE FROM IGNORED_FILES"; + CppSQLite3Query res; + QUERYSYNCDB(query, res); + while (!res.eof()) + { + std::string file(res.getStringField(0)); + std::string ignore(res.getStringField(1)); + mList[file] = ignore == "0"? true : false; + res.nextRow(); + } + + } + + bool Synchronizer::isIndexed(const std::string filename) + { + bool valid = true; + std::map ::iterator it_list = mList.begin(); + for(;it_list != mList.end(); it_list++) + { + if(it_list->first == filename) + { + valid = false; + break; + } + } + return valid; + } +} \ No newline at end of file diff --git a/src2/creaImageIOSynchron.h b/src2/creaImageIOSynchron.h index 422c2eb..fde9f2d 100644 --- a/src2/creaImageIOSynchron.h +++ b/src2/creaImageIOSynchron.h @@ -102,6 +102,12 @@ namespace creaImageIO const std::string& searchParam, const std::string& searchValue, const std::string& refdb); + // Get the List of indexed files (removed or not) + void GetList(); + // Test to not if a file is indexed on db or not + bool isIndexed(const std::string filename); + // List of all indexed files + std::map mList; ///The current AddList std::vector mAddList; ///The current RemoveList diff --git a/src2/creaImageIOTreeHandlerImageAdder.cpp b/src2/creaImageIOTreeHandlerImageAdder.cpp index ad88ef7..b1a6043 100644 --- a/src2/creaImageIOTreeHandlerImageAdder.cpp +++ b/src2/creaImageIOTreeHandlerImageAdder.cpp @@ -50,7 +50,7 @@ namespace creaImageIO std::vector::const_iterator i; for (i=filenames.begin();i!=filenames.end();++i) { - mTimestampHandler->AddFile((*i), fs::last_write_time(*i), time(0),mCurrentDB); + mProgress.IncNumberScannedFiles(); if (IsHandledFile(*i)) { @@ -80,6 +80,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(); AddDirectoryRecursor( directory, recurse, addKey ); int nFiles=GetProgress().GetNumberAddedFiles(); @@ -161,6 +162,7 @@ namespace creaImageIO } } + //===================================================================== void TreeHandlerImageAdder::AddDirectoryRecursor(const std::string &dirpath, bool recursive, @@ -172,11 +174,12 @@ namespace creaImageIO if ( !fs::exists( dirpath ) ) return; time_t lastModif=fs::last_write_time(dirpath); + fs::directory_iterator end_itr; // default construction yields past-the-end for ( fs::directory_iterator itr( dirpath ); itr != end_itr; ++itr ) - { + { // If is directory & recurse : do recurse if ( fs::is_directory(itr->status()) ) { @@ -188,7 +191,8 @@ namespace creaImageIO else { std::string parent_id; - bool valid=mTimestampHandler->AddDirectory(dirpath, itr->string(), lastModif, time(0),mCurrentDB); + // tTest if directory (and only it) exists or not. + bool valid = mSynchronizer->isIndexed(itr->string());//true;//=mTimestampHandler->AddDirectory(dirpath, itr->string(), lastModif, time(0),mCurrentDB); if(valid) { mProgress.IncNumberScannedFiles(); @@ -197,7 +201,6 @@ namespace creaImageIO mProgress.IncNumberHandledFiles(); AddFile( itr->string() ); mTreeHandler->GetTopLevelNodeId("FullFileName",itr->string(),parent_id); - mTimestampHandler->SetAttribute("TopLevelNodeId",parent_id,"PATH",itr->string()); std::stringstream removedOn; removedOn<InsertIgnoreFile(addKey, itr->string(),"0",removedOn.str(),mCurrentDB); @@ -211,7 +214,6 @@ namespace creaImageIO } } - mTimestampHandler->SetAttribute("TopLevelNodeId",parent_id,"PATH",dirpath); } } @@ -352,7 +354,6 @@ namespace creaImageIO //For the new files, add them for (i=newFiles.begin();i!=newFiles.end();++i) { - mTimestampHandler->AddFile((*i), fs::last_write_time(*i), time(0),mCurrentDB); if (IsHandledFile(*i)) { std::stringstream removedOn; @@ -487,17 +488,14 @@ namespace creaImageIO if(!boost::filesystem::exists(directory)) { boost::filesystem::create_directory(boost::filesystem::path(directory)); - mTimestampHandler->AddDirectory("",directory,fs::last_write_time(directory)+10, time(0),mCurrentDB); mSynchronizer->InsertAddOp(directory,"0","0",mCurrentDB); } std::string addKey=mSynchronizer->GetAttribute("ADD_KEY","ADD_OPS","PATH",directory,mCurrentDB); - std::string parent_id=mTimestampHandler->IsIndexed(directory,mCurrentDB); size_t last; std::vector newNames; for(i=filenames.begin();i!=filenames.end();++i) { std::string dir=directory.c_str(); - mTimestampHandler->CleanPath(dir); if(boost::filesystem::exists(*i) && (*i).find(dir)==std::string::npos) { std::string path=*i; @@ -514,19 +512,11 @@ namespace creaImageIO p++; } std::string result=out.str(); - mTimestampHandler->CleanPath(result); boost::filesystem::copy_file((*i),result); //To update image database mTreeHandler->SetAttribute("Image","FullFileName",result,"FullFileName", (*i)); - //To update timestamp database - mTimestampHandler->SetAttribute("PATH",result,"PATH",(*i)); - mTimestampHandler->SetAttribute("PARENT_ID",parent_id,"PATH",result); - std::stringstream t; - t<SetAttribute("LastModified",t.str(),"PATH",result); - //To update maintenance database //1.Add the new path and increase number of children on new operation. std::stringstream removedOn; @@ -580,9 +570,6 @@ namespace creaImageIO void TreeHandlerImageAdder::DeleteDriveFromOtherDB(const std::string& drive) { - //Delete from timestamp - mTimestampHandler->RemoveEntries("FILES", "PATH", "LIKE", drive+"%"); - //Delete from maintenance mSynchronizer->RemoveEntries("ADD_OPS", "PATH", "LIKE", drive+"%"); mSynchronizer->RemoveEntries("IGNORED_FILES", "PATH", "LIKE", drive+"%"); diff --git a/src2/creaImageIOWxGimmickView.cpp b/src2/creaImageIOWxGimmickView.cpp index a77f9a7..447b35b 100644 --- a/src2/creaImageIOWxGimmickView.cpp +++ b/src2/creaImageIOWxGimmickView.cpp @@ -20,6 +20,7 @@ using namespace crea; #include "icons/synchronize.xpm" #include "icons/settings.xpm" #include "icons/tools.xpm" +//#include "icons/import.xpm" #include #include @@ -423,9 +424,10 @@ namespace creaImageIO mProgressDialog = new wxProgressDialog(_T("Adding directory"), _T(""), - 1000, + NumberFilesToAdd(dirname,recurse), this, - wxPD_ELAPSED_TIME | + wxPD_ELAPSED_TIME | + wxPD_SMOOTH | // wxPD_ESTIMATED_TIME | // wxPD_REMAINING_TIME | wxPD_CAN_ABORT ); @@ -442,6 +444,33 @@ namespace creaImageIO mViewer->StartPlayer(); } + + //================================================= + // Determines number of files potentially to add to database + int WxGimmickView::NumberFilesToAdd(const std::string &dirpath, bool recursive) + { + int nb = 0; + if ( !boost::filesystem::exists( dirpath ) ) return nb; + boost::filesystem::directory_iterator end_itr; // default construction yields past-the-end + for ( boost::filesystem::directory_iterator itr( dirpath ); itr != end_itr; ++itr ) + { + // If is directory & recurse : do recurse + if ( boost::filesystem::is_directory(itr->status()) ) + { + if (recursive) + { + nb += NumberFilesToAdd(itr->string(), recursive); + } + } + else + { + nb++; + } + } + return nb; + + } + //================================================= // Test a directory to know if contains sub-directory to analyze bool WxGimmickView::isNeedRecursive(std::string i_name) @@ -715,6 +744,38 @@ namespace creaImageIO dial->ShowModal(); } //================================================= + void WxGimmickView::OnImportExport(wxCommandEvent &Event) + { + wxBusyCursor busy; + // Test if one image is selected => export + // if not =>import + if (GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]) + { + ExportImages(); + } + else + { + ImportImages(); + } + } + + void WxGimmickView::ExportImages() + { + //Archive selection: name, emplacement + //same process than copy local but to a zip + // if settings are yes "always ask for descriptor addition", ask + // if settings are yes, adding descriptor + } + + void WxGimmickView::ImportImages() + { + //Find the *.zip + //dezip + // Contain a descriptor.text + // create a new database, and add to database + // if not, add to current database + // + } //================================================= //AndresDonadio diff --git a/src2/creaImageIOWxGimmickView.h b/src2/creaImageIOWxGimmickView.h index 0b4c74d..b710bca 100644 --- a/src2/creaImageIOWxGimmickView.h +++ b/src2/creaImageIOWxGimmickView.h @@ -8,6 +8,9 @@ #include #include #include + +#include "wx/progdlg.h" + #include "wx/wx.h" #include #include @@ -150,6 +153,15 @@ namespace creaImageIO void OnSettings(wxCommandEvent& event); /// Callback for settings edition void OnTools(wxCommandEvent& event); + /// Callback for Import/Export images + void OnImportExport(wxCommandEvent& event); + + // Import Images from an archive + void ImportImages(); + + //Export Images to an archive + void ExportImages(); + ///Creates the settings dialog (the pages inside and the information) void CreateSettingsDialog(wxNotebook* nb, wxDialog* dial); @@ -158,6 +170,9 @@ namespace creaImageIO /// Test a directory to know if contains sub-directory to analyze bool isNeedRecursive(std::string i_name); + + /// Determines number of files potentially to add to database + int NumberFilesToAdd(const std::string &dirpath, bool recursive); /// AddProgress Gimmick callback void OnAddProgress( Gimmick::AddProgress& ); @@ -170,6 +185,8 @@ namespace creaImageIO ///Create a DB from an Attributes Descriptor files void OnCreateDB(wxCommandEvent& event); + std::string ExtractName(const std::string &i_name); + ///Edits the fields of a given node void CreateEditFieldsDialog(tree::Node* node, std::vector names, std::vector keys); @@ -194,150 +211,7 @@ namespace creaImageIO // EO class WxGimmickView //===================================================================== - - /* - - - - - - - - - //==================================================================== - // General - //==================================================================== - - /// Returns the size of the current selection - virtual int GetSelectionSize() { return 0; } - /// Returns true if there is a valid selection - virtual bool IsSelectionValid(){ return false; } - /// Returns the vector of full filenames of selected images - virtual void GetSelectedFiles(std::vector&){ return; } - /// Returns the vector of images corresponding to selection - virtual void GetSelectedImages(std::vector&){ return; } - /// Returns the vector of DicomNode corresponding to selection - virtual void GetSelectedDicomNodes(std::vector&){ return; } - /// Returns the DicomNode corresponding to the tree item - virtual DicomNode* GetDicomNodeOfItem(const TreeItemId& i); - - - /// Type of list of DicomDatabase - typedef std::vector DicomDatabaseListType; - /// Returns the list of DicomDatabase open - virtual DicomDatabaseListType& GetDicomDatabaseList() - { return null; } - /// Returns the list of DicomDatabase open (const) - virtual const DicomDatabaseListType& GetDicomDatabaseList() const - { return null; } - - protected: - ///Opens an existing database, or else, creates a local database. - virtual void OpenOrNewDatabase(bool open){ return; } - ///Shows the help - virtual void ShowHelp(); - - private: - ///Gets the extension of the database - const std::string& GetDatabaseExtension() { return null; } - ///Sets the extension of the database - virtual void SetDatabaseExtension(const std::string& ext){ return; } - - - //==================================================================== - // Preview Display Related - //==================================================================== - - - ///Shows the image sent as a parameter - private: - virtual void ShowImage(vtkImageData* image){ return; } - - //==================================================================== - // Favorites Related - //==================================================================== - - - public: - ///Loads or creates a favorites database - virtual void LoadOrCreateFavoritesDatabase(){ return; } - private: - ///Creates the user settings directory - void CreateUserSettingsDirectory(){ return; } - ///Obtains the user settings directory - const std::string& GetUserSettingsDirectory(){ return null; } - - //==================================================================== - // Attribute Display Related - //==================================================================== - - - ///Shows the Information regarding the node sent as a parameter - private: - virtual void ShowInformation(DicomNode*){ return; } - - //==================================================================== - // Tree Display Related - //==================================================================== - - protected: - /// Completely rebuilds the view with - /// current DicomDatabaseList - virtual void RebuildView(){ return; } - /// Recursively updates the part of the view corresponding - /// to the DicomDatabase passed - /// i.e. creates items for the DicomNode which do not have - /// deletes obsolete items (whose DicomNode has been deleted) - virtual void UpdateDicomDatabaseView(DicomDatabase*){ return; } - /// Recursively updates the part of the view corresponding - /// to the DicomNode provided. - /// parent is its parent in the tree (where to insert / remove it) - virtual void UpdateDicomNodeView(DicomNode* n, const TreeItemId& parent){ return; } - - private: - ///Type definition of the data regarding the tree - typedef WxGimmickTreeItemData TreeItemData; - ///Gets the item data of the tree item passed as a parameter - TreeItemData* GetItemData(const TreeItemId& id){ return null; } - ///Type definition of the data insid a node of the tree - typedef WxGimmickDicomNodeData NodeData; - - - //==================================================================== - // Class Attributes - //==================================================================== - - - int mSelectionType; - int mSelectionMaxImageDimension; - int mCurrentSelectionImageSize[4]; - - ///Existent Database List - DicomDatabaseListType mDicomDatabaseList; - ///Favorites database - DicomDatabase* mFavoriteDatabase; - - ///Path to the database list file - std::string mDatabaseListFile; - ///Extension of the database - std::string mDatabaseExtension; - - bool mJustStarted; - - int mFirstDicomDatabaseIconIndex; - - // Previewer - vtkImageViewer2* mViewer; - - int mx1,mx2,my1,my2,mz1,mz2; - double mspx,mspy,mspz; - - // Image preview : - // Multi-thread image reader - MultiThreadImageReader mReader; - // map of images name to node - std::map mImageFileNameToNode; - */ + } // EO namespace creaImageIO diff --git a/src2/creaImageIOWxTreeView.cpp b/src2/creaImageIOWxTreeView.cpp index 2fced88..fdf3a5c 100644 --- a/src2/creaImageIOWxTreeView.cpp +++ b/src2/creaImageIOWxTreeView.cpp @@ -1084,114 +1084,6 @@ namespace creaImageIO } //================================================================ - void WxTreeView::SetColor(int l, int item) - { - int colorId=12; - GetCtrl(l)->SetItemTextColour(item, wxColourDatabase().Find - (crea::std2wx(mColorPalette[colorId]))); - GetCtrl(l)->SetItemState(item,wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED, wxLIST_STATE_SELECTED); /* - int colorId=0; - //Setting the color according to the parent - if(l==0) - { - item.SetBackgroundColour - (wxColourDatabase().Find - (crea::std2wx(mColorPalette[colorId]))); - mColorMap.insert - (NodeColorPair - (*j,wxColourDatabase().Find - (crea::std2wx(mColorPalette[colorId])))); - if(colorId<64) - { - colorId++; - } - else - { - colorId=0; - } - } - else if(l!=mLevelList.size()-1) - { - item.SetBackgroundColour(mColorMap[*i]); - mColorMap.insert(NodeColorPair(*j,mColorMap[*i])); - } - else - { - item.SetBackgroundColour(mColorMap[*i]); - }*/ - } - //================================================================ - void WxTreeView::CreateColorPalette() - { - GimmickDebugMessage(6,"WxTreeView::CreateColorPalette"); - mColorPalette.push_back("WHITE"); - mColorPalette.push_back("LIGHT GREY"); - mColorPalette.push_back("AQUAMARINE"); - mColorPalette.push_back("MEDIUM FOREST GREEN"); - mColorPalette.push_back("INDIAN RED"); - mColorPalette.push_back("KHAKI"); - mColorPalette.push_back("ORANGE"); - mColorPalette.push_back("LIGHT BLUE"); - mColorPalette.push_back("LIGHT STEEL BLUE"); - mColorPalette.push_back("PINK"); - mColorPalette.push_back("PLUM"); - mColorPalette.push_back("PURPLE"); - mColorPalette.push_back("RED"); - mColorPalette.push_back("SEA GREEN"); - mColorPalette.push_back("SIENNA"); - mColorPalette.push_back("SKY BLUE"); - mColorPalette.push_back("SLATE BLUE"); - mColorPalette.push_back("SPRING GREEN"); - mColorPalette.push_back("TAN"); - mColorPalette.push_back("THISTLE"); - mColorPalette.push_back("TURQUOISE"); - mColorPalette.push_back("VIOLET"); - mColorPalette.push_back("VIOLET RED"); - mColorPalette.push_back("WHEAT"); - mColorPalette.push_back("YELLOW"); - mColorPalette.push_back("YELLOW GREEN"); - mColorPalette.push_back("BLUE"); - mColorPalette.push_back("BLUE VIOLET"); - mColorPalette.push_back("BROWN"); - mColorPalette.push_back("CADET BLUE"); - mColorPalette.push_back("CORAL"); - mColorPalette.push_back("CORNFLOWER BLUE"); - mColorPalette.push_back("CYAN"); - mColorPalette.push_back("DARK GREY"); - mColorPalette.push_back("DARK GREEN"); - mColorPalette.push_back("DARK OLIVE GREEN"); - mColorPalette.push_back("DARK ORCHID"); - mColorPalette.push_back("DARK SLATE BLUE"); - mColorPalette.push_back("DARK SLATE GREY"); - mColorPalette.push_back("DARK TURQUOISE"); - mColorPalette.push_back("FIREBRICK"); - mColorPalette.push_back("FOREST GREEN"); - mColorPalette.push_back("GOLD"); - mColorPalette.push_back("GOLDENROD"); - mColorPalette.push_back("GREY"); - mColorPalette.push_back("GREEN"); - mColorPalette.push_back("GREEN YELLOW"); - mColorPalette.push_back("LIME GREEN"); - mColorPalette.push_back("MAGENTA"); - mColorPalette.push_back("MAROON"); - mColorPalette.push_back("MEDIUM AQUAMARINE"); - mColorPalette.push_back("MEDIUM BLUE"); - mColorPalette.push_back("MEDIUM GOLDENROD"); - mColorPalette.push_back("MEDIUM ORCHID"); - mColorPalette.push_back("MEDIUM SEA GREEN"); - mColorPalette.push_back("MEDIUM SLATE BLUE"); - mColorPalette.push_back("MEDIUM SPRING GREEN"); - mColorPalette.push_back("MEDIUM TURQUOISE"); - mColorPalette.push_back("MEDIUM VIOLET RED"); - mColorPalette.push_back("MIDNIGHT BLUE"); - mColorPalette.push_back("NAVY"); - mColorPalette.push_back("ORANGE RED"); - mColorPalette.push_back("ORCHID, PALE GREEN"); - mColorPalette.push_back("STEEL BLUE"); - mColorPalette.push_back("BLACK"); - - - } //================================================================ void WxTreeView::GetAttributes(std::vector& areShown, std::vector& notShown, int level) diff --git a/src2/creaImageIOWxTreeView.h b/src2/creaImageIOWxTreeView.h index b8e75f1..126c941 100644 --- a/src2/creaImageIOWxTreeView.h +++ b/src2/creaImageIOWxTreeView.h @@ -130,10 +130,6 @@ namespace creaImageIO /// Updates the view of a level given the selected items of upper level /// Recursive method virtual void RecursiveUpdateLevel( int ); - ///Sets the color of a selected item - void SetColor(int level, int item); - ///Creates the color palette for the first level - void CreateColorPalette(); ///Selects all the elements of a level void SelectAll(int level); ///UnSelects all the elements of a level -- 2.45.0