2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------
29 #ifndef __creaImageIOWxGimmickReaderDialog_h_INCLUDED__
30 #define __creaImageIOWxGimmickReaderDialog_h_INCLUDED__
34 #include <creaImageIOWxGimmickView.h>
35 #include "creaImageIOSystem.h"
44 //=====================================================================
45 //=====================================================================
46 class CREAIMAGEIO_EXPORT WxGimmickReaderDialog : public wxDialog
49 WxGimmickReaderDialog();
50 WxGimmickReaderDialog(wxWindow *parent,
52 const std::string i_namedescp ,
53 const std::string i_namedb ,
57 int image_min_dim = GIMMICK_2D_IMAGE_SELECTION,
58 int image_max_dim = GIMMICK_3D_IMAGE_SELECTION,
59 int output_dim = NATIVE,
62 boost::shared_ptr<Gimmick> GetGimmick() { return mGimmick; }
63 // typedef WxGimmick ViewType;
64 typedef WxGimmickView::EventType EventType;
66 ~WxGimmickReaderDialog();
68 //===============================================================================================
70 //===============================================================================================
72 void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
73 { mView->GetSelectedImages(s, dim); }
75 void GetSelectedImagesInVector(std::vector<vtkImageData*>& s, int dim)
76 { mView->GetSelectedImagesInVector(s, dim); }
78 // ----get selected files in an Output structure-------
79 // out: vector structure output < <img, info>, ... >
80 // i_attr: list of dicom tags to extract
81 // mult: information of one file or multiple files
82 // outmodel: xml-filename that specifies images order..(todo)
83 void getSelected(std::vector<OutStrGimmick> &outG,std::vector< std::string> i_attr, std::vector<std::string> &outFileNames, bool mult, const std::string outmodel)
85 mView->getSelectedFiles(outG, i_attr, outFileNames, mult, outmodel);
88 void GetSelectedFiles(std::vector<std::string>& s)
89 { mView->GetSelectedFiles(s); }
91 void OnSelChanged(EventType& event);
92 void OnContextualMenu(EventType& event);
93 void OnMenuTest(wxCommandEvent& event);
94 void OnValid(bool valid);
95 void OnExit(){ mView->StopPlayer(); }
97 // void OnButtonOk(wxCommandEvent& event);
98 // void OnButtonCancel(wxCommandEvent& event);
106 boost::shared_ptr<Gimmick> mGimmick;
107 WxGimmickView *mView;
110 wxButton *mCancelButton;
111 wxBoxSizer *mtopsizer;
120 }; // class WxGimmickReaderDialog
121 //=====================================================================
123 } // EO namespace creaImageIO
126 #endif // USE_WIDGETS