X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxGimmickView.cpp;h=7594cbef3bcda45fc83ad4ee44106988c3ff7de1;hb=479c2e4dff23a83d55d78a3f6f4887c85e88bf3b;hp=064accc941394e18dd560df5372ed44f2ec34447;hpb=918c6efd4f8ccabcdcfa92e5b13da5c64de5e638;p=creaImageIO.git diff --git a/src2/creaImageIOWxGimmickView.cpp b/src2/creaImageIOWxGimmickView.cpp index 064accc..7594cbe 100644 --- a/src2/creaImageIOWxGimmickView.cpp +++ b/src2/creaImageIOWxGimmickView.cpp @@ -61,7 +61,8 @@ namespace creaImageIO wxWindow *parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, - int image_type, + int min_dim, + int max_dim, int number_of_threads) : wxPanel(parent,id,pos,size), GimmickView(gimmick), @@ -98,15 +99,19 @@ namespace creaImageIO //Gimmick mGimmick=gimmick; + mSelectionMaxDimension=max_dim; + mSelectionMinDimension=min_dim; + // Create the views CreateTreeViews(); // Bottom panel mBottomPanel = new wxPanel(mSplitter,-1); - + mText = new wxStaticText(mBottomPanel, wxID_ANY, wxT("Status: Welcome to Gimmick!")); + // Splitting int hsize = size.GetHeight(); - int bottom_minsize = 200; + int bottom_minsize = 20; mSplitter->SetMinimumPaneSize( bottom_minsize ); mSplitter->SplitHorizontally( mNotebook, mBottomPanel, @@ -180,6 +185,9 @@ namespace creaImageIO name<<"'"<SetMaxDimension(mSelectionMaxDimension); + view->SetMinDimension(mSelectionMinDimension); // TO DO : TEST THAT A VIEW WITH SAME NAME IS NOT // ALREADY IN THE MAP @@ -190,8 +198,18 @@ namespace creaImageIO } //====================================================================== + /// Returns the selected Image so that it complies with the given parameter(<4D) + vtkImageData* WxGimmickView::GetSelectedImage(int dim) + { + return GetTreeViewMap()["Local database"]->GetSelectedImage(dim); + } - + //====================================================================== + /// Returns the selected Images so that they comply with the given parameter(4D) + void WxGimmickView::GetSelectedImages(std::vector& s, int dim) + { + GetTreeViewMap()["Local database"]->GetSelectedImages(s,dim); + } //================================================= void WxGimmickView::CreateIconList() @@ -329,6 +347,15 @@ namespace creaImageIO } //================================================= + //================================================= + void WxGimmickView::SetMessage(const wxString& mess) + { + wxBusyCursor busy; + + mText->SetLabel(_T("Status: ")+mess); + } + //================================================= + //================================================= void WxGimmickView::OnRemove(wxCommandEvent& event) { @@ -393,7 +420,7 @@ namespace creaImageIO EVT_TOOL(TOOL_ADDFILES_ID, WxGimmickView::OnAddFiles) EVT_TOOL(TOOL_ADDDIR_ID, WxGimmickView::OnAddDir) EVT_TOOL(TOOL_REMOVE_ID, WxGimmickView::OnRemove) - END_EVENT_TABLE() + END_EVENT_TABLE() //================================================= } // EO namespace creaImageIO