#if defined(BUILD_BRUKER)
#include "bruker2dicom.h"
#endif
+
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
+
namespace creaImageIO
{
TOOL_SETTINGS_ID = 7,
TOOL_TOOLS_ID = 8,
TOOL_CREATEDB_ID = 9,
- TOOL_PACS_ID = 10
+ TOOL_PACS_ID = 10
};
//======================================================================
// Create the tool bar
CreateToolBar();
- sizer->Add( mToolBar ,0, wxGROW ,0);
+ sizer->Add( mToolBar, 0, wxGROW, 0);
// Split part below toolbar into notebook for views and panel
// for preview, messages...
mSplitter = new wxSplitterWindow( this , -1);
-
-
+
// Notebook
mNotebook = new wxNotebook(mSplitter,
- -1,wxDefaultPosition, wxDefaultSize, 0);
+ -1, wxDefaultPosition, wxDefaultSize, 0);
//Gimmick
mGimmick=gimmick;
-
- mSelectionMaxDimension= max_dim;
- mSelectionMinDimension= min_dim;
+ mSelectionMaxDimension = max_dim;
+ mSelectionMinDimension = min_dim;
// Create the views
CreateTreeViews();
mSplitter->SplitHorizontally( mNotebook, mBottomPanel,
top_minsize);
- sizer->Add( mSplitter,1,wxGROW ,0);
+ sizer->Add( mSplitter, 1, wxGROW, 0);
mProgressDialog=0;
SetSizer( sizer );
SetAutoLayout(true);
Layout();
mListener=new Listener();
- mListener->ConnectObserver(boost::bind( &WxGimmickView::OnDriveMount , this, _1 ) );
+ mListener->ConnectObserver(boost::bind( &WxGimmickView::OnDriveMount, this, _1 ) );
mListener->Create();
mListener->Run();
mListener->Pause();
GimmickMessage(2,"Creating the tree view for '"<<
name<<"'"<<std::endl);
// Create the WxTreeView
- WxTreeView* view = new WxTreeView(h,this,mNotebook,-1);
+ WxTreeView* view = new WxTreeView(h, this, mNotebook, -1);
// TO DO : TEST THAT A VIEW WITH SAME NAME IS NOT
// ALREADY IN THE MAP
{
std::vector<std::string> files;
GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files);
- ReadImagesNotThreaded(s,files,dim);
+ ReadImagesNotThreaded(s, files, dim);
+ }
+
+ //======================================================================
+ void WxGimmickView::GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
+ {
+ std::vector<std::string> files;
+ GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->GetSelectedAsString(files);
+ ReadImagesNotThreadedInVector(s, files, dim);
}
//======================================================================
wxIcon icons[20];
// should correspond to Icon_xxx enum
- icons[Icon_accept] = wxIcon(accept_xpm);
- icons[Icon_add] = wxIcon(add_xpm);
- icons[Icon_folder_down] = wxIcon(folder_down_xpm);
- icons[Icon_page_down] = wxIcon(page_down_xpm);
- icons[Icon_remove] = wxIcon(remove_xpm);
- icons[Icon_database_add] = wxIcon(database_add_xpm);
- icons[Icon_help] = wxIcon(help_xpm);
- icons[Icon_synchronize] = wxIcon(synchronize_xpm);
+ icons[Icon_accept] = wxIcon(accept_xpm);
+ icons[Icon_add] = wxIcon(add_xpm);
+ icons[Icon_folder_down] = wxIcon(folder_down_xpm);
+ icons[Icon_page_down] = wxIcon(page_down_xpm);
+ icons[Icon_remove] = wxIcon(remove_xpm);
+ icons[Icon_database_add] = wxIcon(database_add_xpm);
+ icons[Icon_help] = wxIcon(help_xpm);
+ icons[Icon_synchronize] = wxIcon(synchronize_xpm);
icons[Icon_create_database] = wxIcon(create_database_xpm);
- icons[Icon_settings] = wxIcon(settings_xpm);
- icons[Icon_tools] = wxIcon(tools_xpm);
+ icons[Icon_settings] = wxIcon(settings_xpm);
+ icons[Icon_tools] = wxIcon(tools_xpm);
// unsigned int NbIcons = 8;
// Make an image list containing small icons
1000,
this,
wxPD_ELAPSED_TIME |
- // wxPD_ESTIMATED_TIME |
- // wxPD_REMAINING_TIME |
+ // wxPD_ESTIMATED_TIME |
+ // wxPD_REMAINING_TIME |
wxPD_CAN_ABORT );
// TO DO : select the current tree handler
if (FD->ShowModal()==wxID_OK)
{
-
-
std::string dirname = wx2std (FD->GetPath());
bool recurse = isNeedRecursive(dirname);
if (recurse)
{
- recurse = wxMessageBox(_T("Recurse into sub-directories ?"), _T("Scan directory"), wxYES_NO,this ) == wxYES ? true : false;
+ recurse = wxMessageBox(_T("Recurse into sub-directories ?"), _T("Scan directory"), wxYES_NO,this ) == wxYES ? true : false;
}
-
+
wxBusyCursor busy;
wxString title(_T("Adding directory"));
if (recurse)
this,
wxPD_ELAPSED_TIME |
wxPD_SMOOTH |
- // wxPD_ESTIMATED_TIME |
- // wxPD_REMAINING_TIME |
+ // wxPD_ESTIMATED_TIME |
+ // wxPD_REMAINING_TIME |
wxPD_CAN_ABORT );
-
+
mCurrentDirectory = FD->GetPath();
mGimmick->AddDir(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),dirname,recurse);
mProgressDialog->Pulse(_T("Updating view..."));
-
+
UpdateTreeViewLevel(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),1);
delete mProgressDialog;
DisplayAddSummary();
-
}
mViewer->StartPlayer();
}
- //=================================================
+ //=================================================
// Determines number of files potentially to add to database
int WxGimmickView::NumberFilesToAdd(const std::string &dirpath, bool recursive)
{
}
}
return nb;
-
}
- //=================================================
+ //=================================================
// Test a directory to know if contains sub-directory to analyze
bool WxGimmickView::isNeedRecursive(std::string i_name)
{
ClearSelection();
}*/
ReadImageThreaded(sel);
-
-
}
//==================================================
mViewer->RefreshIfNecessary();
ResetExtent();
}
-
+
//=================================================
//=================================================
}
//=================================================
-
+
//=================================================
void WxGimmickView::AddIgnoreFile(tree::Node* toRemove)
{
mGimmick->RemoveFile(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),toRemove);
- GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->UpdateLevel(1);
+ // GetTreeViewMap()[crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection()))]->UpdateLevel(1);
}
//=================================================
dial->SetSizer(siz);
dial->ShowModal();
}
+
//=================================================
void WxGimmickView::OnImportExport(wxCommandEvent &Event)
{
}
}
}
-
else
{
wxMessageBox(_T("One or both of the directory fields are empty"),_T("Empty Fields"),wxOK,this);
delete gimmickTools;
#endif
}
-
mViewer->StartPlayer();
}
+
//=================================================
void WxGimmickView::CreateSettingsDialog(wxNotebook* nb, wxDialog* dial)
} // EO namespace creaImageIO
-