#ifndef __creaImageIOImageFinder_h_INCLUDED__ #define __creaImageIOImageFinder_h_INCLUDED__ #include #include #include #include namespace creaImageIO { /** * \ingroup Model */ //======================================================================= /// Parses (recursively) a part of a filesystem to look for known images and load their attributes in order to add the images to a Tree (submission via a TreeHandler::AddBranch) class ImageFinder { public: ///==================================================================== /// Ctor ImageFinder(TreeHandler* tree); /// Dtor ~ImageFinder(); ///==================================================================== /* struct UpdateSummary { int scanned_dirs; int scanned_files; int handled_images; int added_images; int added_patients; int added_studies; int added_series; long parse_time; long file_scan_time; long update_structs_time; long update_database_time; long total_time; bool cancelled_by_user; UpdateSummary() : scanned_dirs(0), scanned_files(0), handled_images(0), added_images(0), added_patients(0), added_studies(0), added_series(0), parse_time(0), file_scan_time(0), update_structs_time(0), update_database_time(0), total_time(0), cancelled_by_user(false) {} }; */ /// bool IsHandledFile( const std::string& filename); bool AddFile( const std::string& filename ); // UpdateSummary& summary ); bool AddFiles( const std::vector& filename ); // wxProgressDialog* progress, // UpdateSummary& summary); bool AddDirectory( const std::string& directory, bool recurse ); // wxProgressDialog* progress, // UpdateSummary& summary // ); void ParseDirectory( const std::string& directory, std::vector &Filenames, bool recurse ); // wxProgressDialog* progress, // UpdateSummary& summary); private: TreeHandler* mTreeHandler; ImageReader mReader; // wxStopWatch msw[10]; }; // EO class ImageFinder //======================================================================= } // EO namespace creaImageIO // EOF #endif