]> Creatis software - creaImageIO.git/blob - bbtk/src/bbcreaImageIOItkImagesChooserDialogBox.h
c110c0936a3def2fedc75e9392e2eb40d7f50c5a
[creaImageIO.git] / bbtk / src / bbcreaImageIOItkImagesChooserDialogBox.h
1 /*
2         # ---------------------------------------------------------------------
3         #
4         # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
5         #                        pour la Santé)
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
9         #
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.
16         #
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
21         #  liability. 
22         #
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         # ------------------------------------------------------------------------
26 */
27 //===== 
28 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
29 //===== 
30 #ifndef __bbcreaImageIOItkImagesChooserDialogBox_h_INCLUDED__
31 #define __bbcreaImageIOItkImagesChooserDialogBox_h_INCLUDED__
32
33 #define BBTK_ITK_IMAGE_DIM_2
34 #define BBTK_ITK_IMAGE_DIM_3
35 #define BBTK_ITK_IMAGE_DIM_4
36 #define BBTK_ITK_IMAGE_TYPE_int8_t
37 #define BBTK_ITK_IMAGE_TYPE_uint8_t
38 #define BBTK_ITK_IMAGE_TYPE_int16_t
39 #define BBTK_ITK_IMAGE_TYPE_uint16_t
40 #define BBTK_ITK_IMAGE_TYPE_int32_t
41 #define BBTK_ITK_IMAGE_TYPE_uint32_t
42 #define BBTK_ITK_IMAGE_TYPE_float
43 #define BBTK_ITK_IMAGE_TYPE_double
44
45 #include "bbcreaImageIO_EXPORT.h"
46 #include "bbtkAtomicBlackBox.h"
47 #include "bbitkImage.h"
48 #include "bbtkAny.h"
49 #include "creaImageIOWxAnySimpleDlg.h"
50
51 namespace bbcreaImageIO
52 {
53 typedef std::vector<vtkImageData*> OutputImagesVTKType;
54 typedef std::vector<bbitk::anyImagePointer> OutputImagesITKType;
55
56 class bbcreaImageIO_EXPORT ItkImagesChooserDialogBox
57  : 
58    public bbtk::AtomicBlackBox
59 {
60   BBTK_BLACK_BOX_INTERFACE(ItkImagesChooserDialogBox,bbtk::AtomicBlackBox);
61  
62   
63         creaImageIO::WxAnySimpleDlg *dlg;
64          
65
66 //===== 
67 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
68 //===== 
69   BBTK_DECLARE_INPUT(Title,std::string);
70   BBTK_DECLARE_OUTPUT(OutVImages,OutputImagesVTKType);
71   BBTK_DECLARE_OUTPUT(OutIImages,OutputImagesITKType);
72   BBTK_DECLARE_OUTPUT(Out,bbitk::anyImagePointer);
73   BBTK_PROCESS(Process);
74   void Process();
75
76     private:
77     // Template read method 
78     template<class TImage> void Export();
79
80         // Template export vtk Images
81         template<class TImage> void ExportVTK();
82
83         itk::Object* mOutput;
84 //===== 
85 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
86 //===== 
87 };
88
89 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ItkImagesChooserDialogBox,bbtk::AtomicBlackBox);
90 BBTK_NAME("ItkImagesChooserDialogBox");
91 BBTK_AUTHOR("cervenansky.frederic@creatis.insa-lyon.fr");
92 BBTK_DESCRIPTION("ImagesChooserDialogBox is a simple application to select file(s) or directory or data from Gimmick database, handle them as ITKImage and/or display them. It handles Analayze, DICOM, jpg, tif, png, bmp and mhd.");
93 BBTK_CATEGORY("image;reader;dicom;");
94
95
96 BBTK_INPUT(ItkImagesChooserDialogBox,Title,"Title of the dialog",std::string,"");
97 BBTK_OUTPUT(ItkImagesChooserDialogBox,OutVImages,"The selected Vtkimage",OutputImagesVTKType,"");
98 BBTK_OUTPUT(ItkImagesChooserDialogBox,Out,"Output Image",bbitk::anyImagePointer,"");
99 BBTK_OUTPUT(ItkImagesChooserDialogBox,OutIImages,"Vector of selected images",OutputImagesITKType,"");
100 BBTK_END_DESCRIBE_BLACK_BOX(ItkImagesChooserDialogBox);
101
102 //===== 
103 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
104 //===== 
105 }
106 // EO namespace bbcreaImageIO
107
108 #endif // __bbcreaImageIOItkImagesChooserDialogBox_h_INCLUDED__
109