-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchapter_08_edit_selected_surfaces.tex
More file actions
415 lines (289 loc) · 17.5 KB
/
chapter_08_edit_selected_surfaces.tex
File metadata and controls
415 lines (289 loc) · 17.5 KB
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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
\chapter{Edit selected surfaces}
\minitoc
As a prerequisite, you need to select surfaces. Only selected surfaces can be edited.
\section{Structure modifications}
\subsection{Invert}
A given surface's triangles can be
inverted in order to show inner structures (see Fig. \ref{inversion}).\\
Note that the original surface
is directly affected; this option
does not involve the use of a
filter (no output additional
surface is created).
\begin{figure}
\centering
\includegraphics[scale=0.4]{images/Edit_selected_objects/01_invert.png}
\caption{Example of surface triangle inversion. Left: original surface.
Right: the same surface inverted, revealing inner structures such
as the endocranial cavity. Gouraud shading rendering + backface
culling option was used.}
\label{inversion}
\end{figure}
\subsection{Mirror}
This option uses vtkReflectionFilter,which produces a mirror image of the original selected input mesh (see Fig. \ref{mirror}).\\
\begin{figure}
\centering
\includegraphics[scale=0.35]{images/Edit_selected_objects/02_Mirror.png}
\caption{Example of fossil restoration implicating the production of mirror images of missing parts.}
\label{mirror}
\end{figure}
\subsection{Connectivity : separate all non connected regions}
\noindent
\begin{minipage}{0.5\textwidth}
This option uses vtkPolyDataConnectivityFilter. This filter produces a new surface for each non-connected region of the selected input surface. 3D meshes of biological objects sometimes contain a multitude of small and biologically irrelevant independent regions. This ``noise" may have multiple origins: low quality of original 3D data, state of preservation of the specimen, threshold used to be able to visualize all relevant structures, etc... In order to extract relevant independent regions, only regions reaching a minimal size (minimal number of triangles) are transformed into new surfaces (see Fig. \ref{decompose34}). This process may take some time to be completed. All produced surfaces corresponding to independent regions can be manipulated independently (see Fig. \ref{decompose5}).\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/03_Decompose.png}
\captionof{figure}{Connectivity decomposition window}
\end{minipage}
\noindent
\begin{figure}
\centering
\includegraphics[scale=0.3]{images/Edit_selected_objects/03_Decompose_34.png}
\caption{Left: Original surface containing a large number of independent regions of size greater than 350 triangles (in grey). Right : Filtered surfaces. All meshes produced using this filter have more than 350 triangles.}
\label{decompose34}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.4]{images/Edit_selected_objects/03_Decompose5.png}
\caption{Left: original surface (one single mesh). Right: the resulting 298 filter output surfaces (each drawn using a different color) can be manipulated independently.}
\label{decompose5}
\end{figure}
\subsection{Connectivity: keep largest region}
This option uses vtkPolyDataConnectivityFilter.This filter produces a new surface for the largest independent region of the selected input surface (see Fig. \ref{largest_region}).
\begin{figure}
\centering
\includegraphics[scale=0.4]{images/Edit_selected_objects/03_Decompose6.png}
\caption{Left: original surface. Right: the resulting largest region in terms of triangle number.}
\label{largest_region}
\end{figure}
\subsection{Lasso cut}\label{lasso_cut_section}
You may cut through an input selected surface using this option (see Fig. \ref{lasso_cut}). Once ``lasso cut" menu is clicked, the mouse cursor changes to a cross in the 3D window. Additional mouse and keyboard controls become available (see Table \ref{lasso_cut_controls}).
\rowcolors{2}{}{gray!25}
\begin{table}
\begin{tabularx}{\linewidth}{ | c | X | }
\hline
Left click & Adds a segment to polygon (segments are drawn yellow) \\ \hline
Right click & Connects last segment to first segment. If two segments cross each other, lasso action is cancelled. Otherwise, the closed polygon is drawn red.\\ \hline
Middle click or ``C" + right click. & Once the lasso is closed (lasso polygon drawn red
after a right click):\newline
when the click falls \textbf{inside}/\textit{outside} the closed red polygon: the region falling \underline{inside} the polygon \textbf{is included}/\textit{is not included} into the filter output surface, respectively. The region falling \underline{outside} the polygon is \textbf{is not included}/\textit{is included} inside the output, respectively.
\\ \hline
\end{tabularx}
\caption{Lasso cut controls}
\label{lasso_cut_controls}
\end{table}
Once ``Middle click" is pressed or ``C" + right click is pressed, the usual mouse and keyboard controls become available again.\\
\begin{figure}
\centering
\includegraphics[scale=0.25]{images/Edit_selected_objects/04_Lasso_cut.pdf}
\caption{Top row. A: Left clicks $\rightarrow$ add new yellow segments. B: Right final click $\rightarrow$ connects last segment to first segment. C: Result of middle click inside red polygon. Bottom row. C: Left clicks $\rightarrow$ add new yellow segments. D: Right final click $\rightarrow$ connects last segment to first segment. E: Result of middle click outside red polygon. }
\label{lasso_cut}
\end{figure}
\subsection{Smooth}
\noindent
\begin{minipage}{0.5\textwidth}
This option uses vtkSmoothPolyDataFilter.You may smooth an input
selected surface using this option (see Fig. \ref{smooth}). A number of iteration and a
relaxation factor are required.\\
See vtkSmoothPolyDataFilter documentation for further information regarding this option.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/05_smooth2.png}
\captionof{figure}{Smoothing window}
\end{minipage}
\noindent
\begin{figure}
\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/05_smooth.png}
\caption{Left: example of original input surface. Right: resulting output surface after 50 iterations using a relaxation factor of 0.1.}
\label{smooth}
\end{figure}
\subsection{TPS deformation}
\noindent
\begin{minipage}{0.5\textwidth}
This option uses vtkThinPlateSplineTransform filter.
Requirements : to use TPS deformation, a selected surface,
a series of ``n" normal landmarks and a series of ``n"
target landmarks (n>3) are needed. ``Normal" landmarks
are usually placed on the original selected input surface,
whereas ``target" landmarks are placed at a location in 3D
space which will drive the TPS deformation (see Fig. \ref{tps}). See vtkThinPlateSplineTransform documentation for further information regarding TPS deformation.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/06_tps.png}
\captionof{figure}{TPS window}
\end{minipage}
\noindent
\begin{figure}
\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/06_tps_input_output.png}
\caption{Left: original distorted input surface. 31 ``normal"
landmarks were placed on the surface and 31
``target" landmarks were placed in order to
restore bilateral symmetry. Right: resulting output (deformation : 100\%). Note
that the 31 ``target" landmarks are located on the output surface.
}
\label{tps}
\end{figure}
\subsection{Decimate}
\noindent
\begin{minipage}{0.5\textwidth}
This option uses vtkDecimatePro and vtkQuadricDecimation filters. Requirements : to use mesh decimation, a selected
surface is required (see for instance Fig. \ref{decimate}). See vtkDecimatePro and vtkQuadricDecimation documentations for further information regarding
mesh decimation.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/07_decimate.png}
\captionof{figure}{Decimate window}
\end{minipage}
\noindent
\begin{figure}
\centering
\includegraphics[scale=0.25]{images/Edit_selected_objects/07_decimate_input_output.png}
\caption{Mesh decimation. Left: original input surface. Number of triangles: 27679. Right: resulting output (vtkQuadricDecimation filter,
decimation factor: 80\%). Number of triangles:5535.
}
\label{decimate}
\end{figure}
\subsection{Densify}
\noindent
\begin{minipage}{0.5\textwidth}
This option uses vtkDensifyPolyData filter.
Requirements : to use mesh densification, a selected
surface is required (see for instance Fig. \ref{densify}).
Note that mesh decimation can become extremely slow
when using number of subdivisions larger than 1.
See vtkDensifyPolyData documentation for further information regarding mesh densification.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/08_densify.png}
\captionof{figure}{Densify window}
\end{minipage}
\noindent
\begin{figure}
\centering
\includegraphics[scale=0.25]{images/Edit_selected_objects/08_densify_input_output.png}
\caption{Mesh densification. Left: original input surface. Number of triangles: 5535. Right: resulting output (number of subdivisions: 1). Number of triangles: 16605.
}
\label{densify}
\end{figure}
\subsection{Fill holes}
\noindent
\begin{minipage}{0.5\textwidth}
This option uses vtkFillHolesFilter.
Requirements : to use mesh hole filling, a selected surface is
required (see for instance Fig. \ref{fill_holes}). See vtkFillHolesFilter documentation for further
information regarding hole filling.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/09_fill_holes.png}
\captionof{figure}{Fill holes window}
\end{minipage}
\noindent
\begin{figure}
\centering
\includegraphics[scale=0.25]{images/Edit_selected_objects/09_fill_holes_input_output.png}
\caption{Filling holes. Left: original input surface. Number of triangles: 5535. Right: resulting output (maximal size: 1). Number of triangles: 5689.}
\label{fill_holes}
\end{figure}
\subsection{Registration ICP}
This option was implemented by Cécile Peladan, and deserves a chapter of its own and a tutorial, which will be written in a near future.
\section{Rendering modifications.}
\subsection{Set alpha value}
\noindent
\begin{minipage}{0.5\textwidth}
A selected surface is needed.\\
Please chose a value between 0 and 100. 100 stands for ``opaque
rendering". 0 stands for ``invisible surface".\\
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/10_transparency.png}
\captionof{figure}{Alpha value setting window}
\end{minipage}
\noindent
As stated earlier, vertex display order has consequences on 3D rendering when working with
transparency. 3D objects are displayed one after the other following an object list. The way object are ordered inside this list thus affects transparency rendering, especially when some objects such as inner structures are positioned inside others. Object display order of selected objects can be changed using the two following controls. Pressing ``\includegraphics[scale=0.7]{images/pixmap/s_dessous_17.png}" will place all selected objects one step earlier in the object display list. Pressing ``\includegraphics[scale=0.7]{images/pixmap/s_dessus_17.png}" will place all selected objects one step further in the object display
list (see for instance Fig. \ref{transparency}). \\
See also ``Sort vertices from back to front (beware: slow rendering)" (section \ref{sort_back_front}) and ``Sort vertices from front to back (beware: slow rendering)" (section \ref{sort_front_back}) for further information.\\
\begin{figure}
\centering
\includegraphics[scale=0.4]{images/Transparency/Transparency.pdf}
\caption{Transparency rendering. A. 3 objects (cranium, left\_inner\_ear and right\_
inner\_ear) are opened in this order, and the object ``cranium" is rendered with an alpha value of 40.
The inner ears remain invisible, because ``cranium" is displayed before the two inner ears are. B: corresponding display object order (Show $\rightarrow$Display
object order). C: the object ``Cranium" was selected and put downward in the object display list. Now the left inner ear is visible, as it is displayed before the cranium is. D: corresponding display object order. E: the object ``Cranium" was selected again, and put downward in the object display list. Now the two inner ears are
visible, because they are both rendered before the cranium is. F: corresponding display object order.}
\label{transparency}
\end{figure}
\subsection{Change object color}
Object color can be changed using this option. A set of 13 predefined colors is available via this menu. Alternatively, you can edit object color manually using the ``Object color" control of the ``General options" window (click on menu ``Show $\rightarrow$General options$\rightarrow$").
\subsection{Edit first selected object and aspect matrices}\label{edit_mat_section}
\noindent
\begin{minipage}{0.6\textwidth}
A selected surface is required . This opens the following window,
in which the aspect and position matrices can be edited.
Options :\\
- Ok : set aspect and position matrices to first selected object.\\
- Init : set aspect and position matrices to identity.\\
- Refresh : change matrices to those of first selected object.\\
- Ok for all selected objects: set aspect and position matrices to
all selected objects.\\
You can also access faster the ``Object Matrix" window by clicking
on ``\includegraphics[scale=0.7]{images/pixmap/mat.png}"(edit first selected object position and aspect matrices).
\end{minipage}
\begin{minipage}{0.4\textwidth}\centering
\includegraphics[scale=0.5]{images/File/Position2.png}
\captionof{figure}{Object matrix window}
\end{minipage}
\noindent
\section{Grouping actions.}
One or several meshes can be placed into one logical object using this option. This option is useful in the following two cases.\\
- It allows an easy way to select/unselect together several objects (sometimes you do not want
to select/unselect manually multiple meshes one by one).\\
- As a logical object's aspect object and position matrices can be edited, placing 1 or several
meshes into one logical object provides a convenient means to achieve deformation into
a particular direction in 3D space (for instance to achieve mesh decompression in one
direction, see for instance Fig. \ref{grouping}).\\
Logical objects can be also put into another logical object. Note that meshes contained into selected logical objects cannot be saved until they are ungrouped.
\subsection{Group}
Select one or several meshes. Click on ``Edit selected surfaces$\rightarrow$Grouping actions$\rightarrow$Group". As a result, the selected meshes are drawn in brown color.
\subsection{Ungroup}
Select one logical object. Click on ``Edit selected surfaces$\rightarrow$Grouping actions$\rightarrow$Ungroup". If the logical object aspect and position matrices are different from the identity matrices, the position and aspect matrices of the contained objects are edited in order to take into account position and aspect transformations that were applied to that logical object. Then the objects contained into the selected logical object are ungrouped, and the selected logical object is deleted.\\
\begin{figure}
\centering
\includegraphics[scale=0.25]{images/Edit_selected_objects/11_group.pdf}
\caption{
Grouping objects. A1: 7 objects are opened. Original matrices of ``bx\_md" object are shown (right mandible, selected). A2: corresponding display object order (Show $\rightarrow$Display object order). B1: The 7 object are grouped. The group is drawn in brown. B2: corresponding display object order. C1: the position of the group is changed, as well as its aspect matrix. Note that the enclosed meshes cannot be saved in that state. C2: corresponding display object order. D1: objects are ungrouped. Modified matrices of ``bx\_md" object are shown (right mandible is selected). Now, the 7 meshes can be saved. D2: corresponding display object order (Show $\rightarrow$Display object order).}
\label{grouping}
\end{figure}
\section{Object list order.}
As explained earlier, the following options are useful when working with transparent objects. Normal and Target landmark ordering can also be edited using these options.
\\As stated above, access to object display order can be reached via the menu ``Show$\rightarrow$Display object order".
\subsection{Move up}
All selected objects (landmarks or surfaces) will be placed one step earlier in the object display list.
This action can also be reached via the following button:\includegraphics[scale=0.7]{images/pixmap/s_dessous_17.png}
\subsection{Move down}
All selected objects (landmarks or surfaces) will be placed one step further in the object display list.
This action can also be reached via the following button:\includegraphics[scale=0.7]{images/pixmap/s_dessus_17.png}
See tutorial ``working with landmarks" for further information.
\section{Delete small objects.}
\subsection{Threshold : a given number of triangles}
\noindent
\begin{minipage}{0.5\textwidth}
Using this option, you may delete selected objects smaller than a given number of triangles.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/Delete_small_1.png}
\captionof{figure}{Delete small objects window}
\end{minipage}
\noindent
\subsection{Threshold : a given volume}
\noindent
\begin{minipage}{0.5\textwidth}
Using this option, you may delete selected objects smaller than a given volume.
\end{minipage}
\begin{minipage}{0.5\textwidth}\centering
\includegraphics[scale=0.5]{images/Edit_selected_objects/Delete_small_2.png}
\captionof{figure}{Delete small objects window 2}
\end{minipage}
\noindent