File: TutorialSectionEdgeBasedSegmentation.html

package info (click to toggle)
itksnap 3.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,196 kB
  • ctags: 9,196
  • sloc: cpp: 62,895; sh: 175; makefile: 13
file content (301 lines) | stat: -rw-r--r-- 12,340 bytes parent folder | download | duplicates (5)
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>SNAP Tutorial. Section 7.</title>
  <meta content="text/html; charset=iso-8859-1"
 http-equiv="Content-Type">
</head>
<body>
<h2>Section 7. Segmentation Using Edge Based Snakes<br>
</h2>
<p>This section assumes that the reader has competed the region
competition based segmentation tasks in the previous section. The
instructions offered in this section are less detailed than previous
sections, since the reader would have gained sufficient experience
using the tool in the preceding sections.<br>
</p>

<h3>Step 1. Prepare SNAP for Edge-Based Ventricle Segmentation<br></h3>

<p> The first task in this section is to use edge-based snakes to segment the ventricles in our image. 
In this step we will perform  the preliminary tasks: clearing the previous segmentation, selecting the
appropriate label and entering SNAP mode.</p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36"
 src="Artwork/ttIconAction.gif"></td>
      <td>
        <p> Discard the previous segmentation. Refer to 
        <a href="TutorialSectionRegionSegmentation.html#discard">Step 1 in Section 6</a> for instructions.</p>
      </td>
    </tr>
  </tbody>
</table>
<br>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36"
 src="Artwork/ttIconAction.gif"></td>
      <td>
        <p> Set 'Ventricles' as the active drawing label and set the <b>Draw Over</b> mode to 'All labels'. Refer to 
        <a href="TutorialSectionRegionSegmentation.html#label">Step 2 in Section 6</a> for instructions.</p>
      </td>
    </tr>
  </tbody>
</table>
<br>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36"
 src="Artwork/ttIconAction.gif"></td>
      <td>
        <p> Select the snake tool in the IRIS toolbox </p>
        <p> Position the 3D selection box to include the ventricles </p>
        <p> Press the <b>Segment 3D</b> to enter the automatic segmentation mode. </p>
        <p> The above tasks are described in <a href="TutorialSectionRegionSegmentation.html#select">Step 3 in Section 6</a> 
        </p>
      </td>
    </tr>
  </tbody>
</table>
<br>

<h3>Step 2. Computing the Edge-Based Feature Image</h3>
<p> At this point, you should be in the automatic segmentation mode of SNAP, on step 1 of the segmentation pipeline </p>

<p> In this step we will compute the feature image that assigns near-zero values to the pixels close to 
intensity edges in the grey image and assigns values close to one to regions of uniform intensity</p>

<p>First let's tell SnAP which type of the feature image we will be
using:</p>
<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36"
 src="Artwork/ttIconAction.gif"></td>
      <td>
      <p>Select the option <strong>Image Edges</strong> in the
section A of the Segmentation Pipeline Wizard. </p>
      </td>
    </tr>
  </tbody>
</table>
<br>
<p align="center"><img src="Artwork/ttEdgePipeline1.gif"></p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Press the button labeled <strong>Preprocess Image...</strong>. The <i>Image Edge Filter</i> window will appear: </p>
      </td>
    </tr>
  </tbody>
</table>
<p align="center"><img src="Artwork/ttEdgeFilterBox.gif"></p>
 
 <p>This window is used to specify how intensity edges are used in constructing the feature image (this construction was outlined in 
 <a href="TutorialSectionIntroductionToAutomatic.html#featureimage">Section 5, Step 2</a>). There are three parameters that you can set in this window: scale of Gaussian blurring, edge contrast and edge mapping exponent.</p>
 
<p>The scale of Gaussian blurring describes how much the greyscale image is blurred before the edges in the image are calculated. At small values of the blurring scale all of the edges in the image will be used in constructing the feature image, which can lead to a prevalence of noisy edges, i.e., intensity discontinuities that do not correspond to boundaries between anatomical structures. For the larger blurring scales, only the most prevalent intensity edges become visible in the feature image, but fine-scale qualities of edges become lost. The selection of the blurring scale is a careful process where a tradeoff is made between too much noise and too little detail. Luckily, the edges between the ventricles and the surrounding tissues are very conspicuous and 'survive' a significant amount of blurring.</p>

<p> The other two parameters, the edge contrast and edge mapping exponent, determine the shape of the curve shown in the above window. This curve is used to map edge stregth to feature image values. The steeper the curve, the greater the contrast between flat regions and edges. 
 Remember that the speed of snake propagation at a point is proportional to the value of the feature image at that point.</p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconTip.gif"></td>
      <td>
        <p>On a fast computer it is advisable to check the <b>Preview result</b> checkbox in order to receive live feedback as you change the parameters in the <i>Image Edge Filter</i> window.</p>
      </td>
    </tr>
  </tbody>
</table> 
<br>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Set the 'Scale of Gaussian Blurring' to 0.6</p>
        <p>Set the 'Edge Contrast' value to 0.030</p>
        <p>Keep the 'Edge Mapping Exponent' value at 2.0</p>
        <p>Press <b>Okay</b> to compute the feature image</p>
      </td>
    </tr>
  </tbody>
</table> 

<p> After this step, the SNAP window should look like this: </p>
<p align="center"><img src="Artwork/ttEdgeFeatureImage.gif"></p>

<h3>Step 3. Snake Initialization</h3>

<p> In this step we will initialize the snake using bubbles which will grow to assume the shape of the vertricles. When initializing edge based snakes, it is improtant to keep the bubbles entirely within the structure that we are interested in segmenting. Bubble placement for region-competition based feature images 
was described in <a href="TutorialSectionRegionSegmentation.html#bubbles">Section 6, Step 4.</a>.</p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Press the <b>Next</b> buttor to proceed to the next stage of automatic segmentation: 'Step 2. Snake Initialization'</p>
      </td>
    </tr>
  </tbody>
</table> 
<br>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p> Set the bubble radius to <b>3</b></p>
        <p> Place four bubbles inside of the lateral ventricles in the axial view, as illustrated below:</p>
      </td>
    </tr>
  </tbody>
</table> 
<br>

<p align="center"><img src="Artwork/ttEdgeBubbles.gif"></p>

<h3>Step 4. Setting Snake Parameters and Segmentation </h3>

<p> In this step we will experiment with the parameters used for edge-based segmentation. </p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Press the <b>Next</b> buttor to proceed to the next stage of automatic segmentation: 'Step 3. Segmentation'</p>
        <p>Press the <b>Set Parameters...</b> button to bring up the parameter selection window.</p>
      </td>
    </tr>
  </tbody>
</table> 
<br>

<p> We will begin by experimenting with snake evolution with the advection force turned off. You will see how without this force the snake is likely to 'leak' pas the boundaries of the ventricles </p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Set the 'Balloon Force' to 1.0</p>
        <p>Set the 'Curvature Force' to 0.2</p>        
        <p>Set the 'Advection Force' to 0.0</p>        
        <p>Accept the new parameter settings.</p>        
      </td>
    </tr>
  </tbody>
</table> 
<br>

<p align="center"><img src="Artwork/ttEdgeParameters1.gif"></p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Run the snake evolution using the button with the 'Play' (triangle) symbol</p>
        <p>As the snake leaks past the boundaries of the ventricles, press the button with the 'Stop' (square) symbol</p>        
      </td>
    </tr>
  </tbody>
</table> 
<br>

<p align="center"><img src="Artwork/ttEdgeLeaky.gif"></p>

<p> The leaking occurs because the balloon force acts outwards with a strength proportional to the value of the feature image. Since the feature image is positive, the balloon force never stops acting, so the snake never stops growing. Luckily, the advection force can be used to get the snake to stop. The advection force acts inwards when the snake crosses an edge and keeps the snake from expanding further</p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Rewind the segmentation using the button with the Rewind (pair of triangles facing left) symbol.</p>
        <p>Bring up the parameter selection window</p> 
        <p>Set the advection force to 5.0 and press <b>Accept</b></p>
        <p>Run the snake evolution again, stopping it after a 1000 iterations or so.</p>        
      </td>
    </tr>
  </tbody>
</table> 

<p> This time the snake does not leak! </p>

<p align="center"><img src="Artwork/ttEdgeNoLeaks.gif"></p>

<h3>Step 5. Further Experiments </h3>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Experiment with different values of the ballon, curvature and advection forces. What are the values ideal for segmenting the ventricles?</p>        
      </td>
    </tr>
  </tbody>
</table> 
<br>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Try recomputing the feature image using different parameters, such as a smaller scale of Gaussian blurring. You should be able to get a better segmentation than before.</p>        
      </td>
    </tr>
  </tbody>
</table> 
<br>

<p> By now you have mastered the most important features of SNAP!</p>

<table cellspacing="0" cellpadding="4" align="center" border="1"
 width="80%">
  <tbody>
    <tr>
      <td valign="top" width="36"><img height="36" width="36" src="Artwork/ttIconAction.gif"></td>
      <td>
        <p>Experiment with segmenting other structures in the brain. For example, it's possible to segment the caudates using edge-based snakes. Even the hippocampus can be partially segmented, but extensive manual post-processing will be necessary.</p>        
      </td>
    </tr>
  </tbody>
</table> 
<br>

</body>
</html>