File: plugin.xml

package info (click to toggle)
sight 25.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,252 kB
  • sloc: cpp: 310,629; xml: 17,622; ansic: 9,960; python: 1,379; sh: 144; makefile: 33
file content (202 lines) | stat: -rw-r--r-- 8,279 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
<plugin id="tuto05_mesher">
    <requirement id="sight::module::service" />
    <requirement id="sight::module::ui::qt" />
    <extension implements="sight::app::extension::config">
        <id>tuto05_mesher</id>
        <config>
            <!-- ******************************* Objects declaration ****************************** -->

            <!-- Deferred Mesh object associated to the uid 'my_mesh' -->
            <object uid="my_mesh" type="sight::data::mesh" deferred="true" />

            <!-- ModelSeries object associated to the key 'my_model_series' -->
            <object uid="my_model_series" type="sight::data::model_series" />

            <!-- image_series object associated to the key 'image_series' -->
            <object uid="image_series" type="sight::data::image_series" />

            <!-- ******************************* UI declaration *********************************** -->
            <service uid="main_frame" type="sight::module::ui::frame">
                <gui>
                    <frame>
                        <name>Tutorial 5: Mesh a segmentation mask</name>
                        <icon>tuto05_mesher/tuto.ico</icon>
                        <min_size width="800" height="600" />
                    </frame>
                    <menubar />
                </gui>
                <registry>
                    <menubar sid="menu_bar_view" />
                    <view sid="container_view" />
                </registry>
            </service>

            <service uid="menu_bar_view" type="sight::module::ui::menubar">
                <gui>
                    <layout>
                        <menu name="File" />
                        <menu name="Mesher" />
                    </layout>
                </gui>
                <registry>
                    <menu sid="menu_file_view" />
                    <menu sid="menu_mesher_view" />
                </registry>
            </service>

            <service uid="menu_file_view" type="sight::module::ui::menu">
                <gui>
                    <layout>
                        <menu_item name="Open image" shortcut="Ctrl+O" />
                        <menu_item name="Save image" />
                        <separator />
                        <menu_item name="Save mesh" />
                        <separator />
                        <menu_item name="Quit" special_action="QUIT" shortcut="Ctrl+Q" />
                    </layout>
                </gui>
                <registry>
                    <menu_item sid="open_image_act" />
                    <menu_item sid="save_image_act" />
                    <menu_item sid="save_mesh_act" />
                    <menu_item sid="quit_act" />
                </registry>
            </service>

            <service uid="menu_mesher_view" type="sight::module::ui::menu">
                <gui>
                    <layout>
                        <menu_item name="Compute Mesh (VTK)" />
                    </layout>
                </gui>
                <registry>
                    <menu_item sid="create_mesh_act" />
                </registry>
            </service>

            <!--
                Default view service:
                The type 'sight::ui::layout::line' represents a layout where the view are aligned
                horizontally or vertically (set orientation value 'horizontal' or 'vertical').
                It is possible to add a 'proportion' attribute for the <view> to defined the proportion
                used by the view compared to the others.
            -->
            <service uid="container_view" type="sight::module::ui::view">
                <gui>
                    <layout type="sight::ui::layout::line">
                        <orientation value="horizontal" />
                        <view />
                        <view />
                    </layout>
                </gui>
                <registry>
                    <view sid="image_srv" />
                    <view sid="mesh_render_srv" />
                </registry>
            </service>

            <!-- ******************************* Actions ****************************************** -->
            <service uid="quit_act" type="sight::module::ui::quit" />
            <service uid="open_image_act" type="sight::module::ui::action" />
            <service uid="save_image_act" type="sight::module::ui::action">
                <state enabled="false" />
            </service>
            <service uid="save_mesh_act" type="sight::module::ui::action">
                <state enabled="false" />
            </service>
            <service uid="create_mesh_act" type="sight::module::ui::action" />

            <service uid="mesher_srv" type="sight::module::filter::mesh::vtk_mesher">
                <in key="image_series" uid="image_series" />
                <inout key="model_series" uid="my_model_series" />
                <properties percent_reduction="0" value="255" />
            </service>

            <!-- ******************************* Services ***************************************** -->

            <!-- Add a shortcut in the application (key "v") -->
            <service uid="shortcut_srv" type="sight::module::ui::qt::com::signal_shortcut">
                <config shortcut="v" sid="container_view" />
            </service>

            <!--
                Services associated to the image data :
                Visualization, reading and writing service creation.
            -->
            <service uid="image_srv" type="sight::module::viz::sample::image">
                <in key="image" uid="image_series" />
            </service>

            <service uid="image_reader_srv" type="sight::module::ui::io::selector">
                <inout key="data" uid="image_series" />
                <type mode="reader" />
            </service>

            <service uid="image_writer_srv" type="sight::module::ui::io::selector">
                <inout key="data" uid="image_series" />
                <type mode="writer" />
            </service>

            <!--
                Services associated to the Mesh data :
                Visualization, reading and writing service creation.
            -->
            <service uid="mesh_render_srv" type="sight::module::viz::sample::mesh">
                <in key="mesh" uid="my_mesh" />
            </service>

            <service uid="mesh_writer_srv" type="sight::module::ui::io::selector">
                <inout key="data" uid="my_mesh" />
                <type mode="writer" />
            </service>

            <!-- Extract mesh from ModelSeries-->
            <service uid="extract_mesh_srv" type="sight::module::data::get_mesh">
                <in key="modelSeries" uid="my_model_series" />
                <out group="mesh">
                    <key index="0" uid="my_mesh" />
                </out>
            </service>

            <!-- ******************************* Connections ***************************************** -->
            <connect>
                <signal>shortcut_srv/activated</signal>
                <slot>create_mesh_act/update</slot>
            </connect>

            <connect>
                <signal>create_mesh_act/clicked</signal>
                <slot>mesher_srv/update</slot>
            </connect>

            <connect>
                <signal>mesher_srv/completed</signal>
                <slot>extract_mesh_srv/update</slot>
            </connect>

            <connect>
                <signal>extract_mesh_srv/updated</signal>
                <slot>save_mesh_act/enable</slot>
            </connect>

            <!-- Connections for general menu services -->
            <connect>
                <signal>open_image_act/clicked</signal>
                <slot>image_reader_srv/update</slot>
                <slot>save_image_act/enable</slot>
            </connect>

            <connect>
                <signal>save_image_act/clicked</signal>
                <slot>image_writer_srv/update</slot>
            </connect>

            <connect>
                <signal>save_mesh_act/clicked</signal>
                <slot>mesh_writer_srv/update</slot>
            </connect>

            <update uid="extract_mesh_srv" />
        </config>
    </extension>
</plugin>