]> Creatis software - creaImageIO.git/blob - bbtk/src/bbImagesReader.xml
Add a simple dialog box to select file(s or directory or data from creaImageIO database
[creaImageIO.git] / bbtk / src / bbImagesReader.xml
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!--==========================================================================
3    STARTS THE DESCRIPTION OF THE BLACK BOX -->
4 <blackbox name="ImagesReader">
5   <!--========================================================================
6     THE BOX DOCUMENTATION -->
7   <author>cervenansky.frederic@creatis.insa-lyon.fr</author>
8   <description>
9     ImagesRedear is a simple application to select file(s) or directory or data from Gimmick database and display them. It handles DICOM,jpg,tif,png,bmp and mhd."
10   </description>
11   <category>image;reader;dicom</category>
12
13   <!--========================================================================
14     #include directives to be put in the .h generated
15     There must be one tag per file to include -->
16   <include>creaImageIOWxSimpleView.h</include>
17   <!--========================================================================
18     INPUTS/OUTPUTS DECLARATION -->
19
20   <input name="Title" type="std::string" description="Title of the dialog"/>
21   <typedef>
22     <PRE>
23       typedef std::vector<vtkImageData*> OutputImagesType;</PRE>
24   </typedef>
25
26   <output name="Out" type="OutputImagesType" description="The selected images"/>
27   
28   <!--========================================================================
29     PROCESS section -->
30
31   <process>
32     <PRE>
33       creaImageIO::WxSimpleView dlg(0,crea::std2wx(bbGetInputTitle()));
34       dlg.ShowModal();
35       if (bbGetInputOutput()==0)
36       {
37       bbSetOutputOut( x.getImagesSelected());
38       }
39
40     </PRE>
41   </process>
42
43   <!--======================================================================
44    CONSTRUCTORS / DESTRUCTORS (OPTIONAL) -->
45
46   <constructor>
47     <PRE>
48       bbSetInputImageDimension(3);
49       bbSetInputTitle("Select image(s)");
50       bbSetInputOutput(0);
51       bbSetOutputOut(0);
52     </PRE>
53   </constructor>
54
55
56   <!-- THE COPY-CONSTRUCTION METHOD BODY : -->
57   <copyconstructor>
58     <PRE>
59       bbSetOutputOut(0);
60     </PRE>
61   </copyconstructor>
62
63   <!-- THE DESTRUCTION METHOD BODY  -->
64   <destructor>
65     <PRE>
66       std::vector<vtkImageData*>::iterator i;
67     for (i=bbGetOutputOut2().begin();i!=bbGetOutputOut2().end();++i) (*i)->Delete();
68   </PRE>
69   </destructor>
70
71
72
73 </blackbox>
74