1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!--==========================================================================
3 STARTS THE DESCRIPTION OF THE BLACK BOX -->
4 <blackbox name="Gimmick">
5 <!--========================================================================
6 THE BOX DOCUMENTATION -->
7 <author>laurent.guigues@creatis.insa-lyon.fr</author>
8 <description>Gimmick! (Gimme my medical images quick!) is a medical image reader widget. It handles DICOM,jpg,tif,png,bmp and mhd. Images read are stored in sqlite3 databases and thus retrieved very quick next time. Screenshot : <img src=Gimmick1.jpg></img>"</description>
9 <category>image;reader;dicom</category>
11 <!--========================================================================
12 #include directives to be put in the .h generated
13 There must be one tag per file to include -->
14 <include>creaImageIOWxGimmickDialog.h</include>
15 <!--========================================================================
16 INPUTS/OUTPUTS DECLARATION -->
18 <input name="Title" type="std::string" description="Title of the dialog"/>
19 <input name="ImageDimension" type="int" description="The maximal dimensionality of the image to be selected, e.g. 2 for a 2D image, 3 for a 3D image,..."/>
20 <input name="Output" type="int" description="What to output ? 0(default)=image and filenames/1=only filenames"/>
21 <typedef><PRE>typedef std::vector<std::string> OutputFilesType;</PRE></typedef>
22 <typedef><PRE>typedef std::vector<vtkImageData*> OutputImagesType;</PRE></typedef>
24 <output name="Out" type="vtkImageData*" description="The first selected image"/>
25 <output name="Out2" type="OutputImagesType" description="The selected images"/>
26 <output name="Files" type="OutputFilesType" description="The selected files"/>
28 <!--========================================================================
34 creaImageIO::WxGimmickDialog w(0,
36 crea::std2wx(bbGetInputTitle()),
39 bbGetInputImageDimension(),
43 if (w.GetReturnCode() == wxID_OK)
45 if (bbGetInputOutput()==0)
47 std::vector<vtkImageData*> images;
48 w.GetSelectedImages(images);
49 bbSetOutputOut(images[0]);
50 bbSetOutputOut2(images);
52 std::vector<std::string> files;
53 w.GetSelectedFiles(files);
54 bbSetOutputFiles(files);
56 else if (w.GetReturnCode() == wxID_CANCEL)
58 // if (bbGetOutputOut()!=0)
60 // bbGetOutputOut()->Delete();
66 <!--======================================================================
67 CONSTRUCTORS / DESTRUCTORS (OPTIONAL) -->
70 bbSetInputImageDimension(3);
71 bbSetInputTitle("Select image(s)");
78 <!-- THE COPY-CONSTRUCTION METHOD BODY : -->
85 <!-- THE DESTRUCTION METHOD BODY -->
88 std::vector<vtkImageData*>::iterator i;
89 for (i=bbGetOutputOut2().begin();i!=bbGetOutputOut2().end();++i) (*i)->Delete();