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 <output name="Out", type="vtkImageData*" description="The selected image"/>
22 <!--========================================================================
28 creaImageIO::WxGimmickDialog w(0,
30 crea::std2wx(bbGetInputTitle()),
33 bbGetInputImageDimension(),
37 if (w.GetReturnCode() == wxID_OK)
39 std::vector<vtkImageData*> images;
40 w.GetSelectedImages(images);
41 bbSetOutputOut(images[0]);
43 else if (w.GetReturnCode() == wxID_CANCEL)
45 // if (bbGetOutputOut()!=0)
47 // bbGetOutputOut()->Delete();
53 <!--======================================================================
54 CONSTRUCTORS / DESTRUCTORS (OPTIONAL) -->
57 bbSetInputImageDimension(3);
58 bbSetInputTitle("Select image(s)");
64 <!-- THE COPY-CONSTRUCTION METHOD BODY :
66 But this is where you should allocate the output pointers if any
67 and copy the pointed values (to avoid bug caused by multiple references) -->
74 <!-- THE DESTRUCTION METHOD BODY :
76 but this is where you should desallocate the output pointers if any -->
79 if (bbGetOutputOut()!=0) bbGetOutputOut()->Delete();