-
Notifications
You must be signed in to change notification settings - Fork 25
/
dcm2nii.lfm
398 lines (398 loc) · 11.3 KB
/
dcm2nii.lfm
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
object dcm2niiForm: Tdcm2niiForm
Left = 505
Height = 525
Top = 54
Width = 965
ActiveControl = SelectFilesBtn
AllowDropFiles = True
Caption = 'dcm2niix DICOM to NIfTI conversion'
ClientHeight = 525
ClientWidth = 965
Constraints.MinHeight = 440
Constraints.MinWidth = 600
OnClose = FormClose
OnDropFiles = FormDropFiles
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '2.1.0.0'
object Panel1: TPanel
Left = 0
Height = 507
Top = 0
Width = 340
Align = alLeft
ClientHeight = 507
ClientWidth = 340
Constraints.MinHeight = 380
TabOrder = 0
object GeneralGroup: TGroupBox
Left = 1
Height = 215
Top = 1
Width = 338
Align = alTop
AutoSize = True
Caption = 'General'
ClientHeight = 197
ClientWidth = 330
TabOrder = 0
object BidsLabel: TLabel
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = FormatDrop
AnchorSideTop.Side = asrBottom
Left = 4
Height = 16
Top = 157
Width = 126
BorderSpacing.Top = 4
Caption = 'Create BIDS Sidecar:'
ParentColor = False
end
object BidsDrop: TComboBox
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = BidsLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 4
Height = 20
Hint = 'Create a BIDS text file with sequence details.'
Top = 177
Width = 326
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Right = 4
ItemHeight = 26
ItemIndex = 1
Items.Strings = (
'None'
'Yes, Anonymized'
'Yes, with Personal Identifiers'
)
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
Style = csDropDownList
TabOrder = 3
Text = 'Yes, Anonymized'
end
object FormatDrop: TComboBox
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = FormatLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 4
Height = 20
Top = 133
Width = 326
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Right = 4
ItemHeight = 26
ItemIndex = 1
Items.Strings = (
'Uncompressed NIfTI (.nii)'
'Compressed NIfTI (.nii.gz)'
'Uncompressed NRRD (.nrrd)'
'Compressed NRRD (.nhdr/.raw.gz)'
)
OnChange = UpdateCommand
Style = csDropDownList
TabOrder = 2
Text = 'Compressed NIfTI (.nii.gz)'
end
object FormatLabel: TLabel
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = OutDirDrop
AnchorSideTop.Side = asrBottom
Left = 4
Height = 16
Top = 113
Width = 92
BorderSpacing.Top = 4
Caption = 'Output Format:'
ParentColor = False
end
object OutDirDrop: TComboBox
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = OutDirLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 4
Height = 20
Top = 89
Width = 326
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Right = 5
ItemHeight = 26
ItemIndex = 0
Items.Strings = (
'Save NIfTI images to the same folder as DICOM'
'Select custom folder ...'
'/usr/rorden'
)
OnChange = OutDirDropChange
Style = csDropDownList
TabOrder = 1
Text = 'Save NIfTI images to the same folder as DICOM'
end
object OutDirLabel: TLabel
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = OutNameExampleLabel
AnchorSideTop.Side = asrBottom
Left = 4
Height = 16
Top = 69
Width = 105
BorderSpacing.Top = 4
Caption = 'Output Directory:'
ParentColor = False
end
object OutNameExampleLabel: TLabel
AnchorSideLeft.Control = OutNameEdit
AnchorSideTop.Control = OutNameEdit
AnchorSideTop.Side = asrBottom
Left = 12
Height = 16
Top = 49
Width = 132
BorderSpacing.Left = 4
BorderSpacing.Top = 4
Caption = 'Example: 4_T1mprage'
ParentColor = False
end
object OutNameEdit: TEdit
AnchorSideLeft.Control = OutNameLabel
AnchorSideTop.Control = OutNameLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 8
Height = 21
Hint = 'Special values: %a=antenna (coil) name, %b=basename, %c=comments, %d=description, %e=echo number, %f=folder name, %i=ID of patient, %j=seriesInstanceUID, %k=studyInstanceUID, %m=manufacturer, %n=name of patient, %p=protocol, %r=instance number, %s=series number, %t=time, %u=acquisition number, %v=vendor, %x=study ID; %z=sequence name'
Top = 24
Width = 322
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Right = 4
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
TabOrder = 0
Text = '%f_%p_%t_%s'
end
object OutNameLabel: TLabel
Left = 4
Height = 16
Top = 4
Width = 104
BorderSpacing.Left = 4
BorderSpacing.Top = 4
Caption = 'Output Filename:'
ParentColor = False
end
end
object AdvancedGroup: TGroupBox
Left = 1
Height = 152
Top = 216
Width = 338
Align = alTop
AutoSize = True
Caption = 'Advanced'
ClientHeight = 134
ClientWidth = 330
TabOrder = 1
object IgnoreCheck: TCheckBox
Left = 4
Height = 18
Hint = 'Do not convert derived, localizer and 2D images.'#10
Top = 4
Width = 193
BorderSpacing.Left = 4
BorderSpacing.Top = 4
Caption = 'Ignore Derived and 2D Images'
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
TabOrder = 0
end
object LosslessScaleCheck: TCheckBox
AnchorSideLeft.Control = IgnoreCheck
AnchorSideTop.Control = IgnoreCheck
AnchorSideTop.Side = asrBottom
Left = 4
Height = 18
Hint = 'Losslessly scale 16-bit integers to use full dynamic range. This can preserve precision for subsequent transforms.'#10
Top = 26
Width = 145
BorderSpacing.Top = 4
Caption = 'Scale Dynamic Range'
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
TabOrder = 1
end
object PhilipsPreciseCheck: TCheckBox
AnchorSideLeft.Control = IgnoreCheck
AnchorSideTop.Control = LosslessScaleCheck
AnchorSideTop.Side = asrBottom
Left = 4
Height = 18
Hint = 'Use Philips precise float scaling (not display) scaling.'#10
Top = 48
Width = 149
BorderSpacing.Top = 4
Caption = 'Precise Philips Scaling'
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
TabOrder = 2
end
object CropCheck: TCheckBox
AnchorSideLeft.Control = IgnoreCheck
AnchorSideTop.Control = PhilipsPreciseCheck
AnchorSideTop.Side = asrBottom
Left = 4
Height = 18
Hint = 'Remove excess neck from anatomical (e.g. T1) scans. This can improve spatial registration.'
Top = 70
Width = 114
BorderSpacing.Top = 4
Caption = 'Crop 3D Images'
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object VerboseCheck: TCheckBox
AnchorSideLeft.Control = IgnoreCheck
AnchorSideTop.Control = CropCheck
AnchorSideTop.Side = asrBottom
Left = 4
Height = 18
Hint = 'Provide detailed notes on conversion'
Top = 92
Width = 69
BorderSpacing.Top = 4
Caption = 'Verbose'
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
TabOrder = 4
end
object MergeDrop: TComboBox
AnchorSideTop.Control = VerboseCheck
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 4
Height = 20
Hint = 'merge 2D slices from same series regardless of echo, exposure, etc.'
Top = 114
Width = 326
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Right = 4
ItemHeight = 26
ItemIndex = 0
Items.Strings = (
'Automatic Series Merging'
'Always Merge Series Regardless of Differences'
'Never Merge Series with Differences'
)
OnChange = UpdateCommand
ParentShowHint = False
ShowHint = True
Style = csDropDownList
TabOrder = 5
Text = 'Automatic Series Merging'
end
end
object UpdateBtn: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = AdvancedGroup
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 5
Height = 25
Top = 372
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Right = 4
Caption = 'Check for Updates'
OnClick = UpdateBtnClick
TabOrder = 2
end
object ResetBtn: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = UpdateBtn
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 5
Height = 25
Top = 401
Width = 330
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Right = 4
Caption = 'Reset Defaults'
OnClick = ResetBtnClick
TabOrder = 3
end
object SelectFilesBtn: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = ResetBtn
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 5
Height = 20
Top = 430
Width = 330
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 4
BorderSpacing.Top = 4
BorderSpacing.Right = 4
Caption = 'Select Folder To Convert...'
OnClick = SelectFilesBtnClick
TabOrder = 4
end
end
object StatusBar1: TStatusBar
Left = 0
Height = 18
Top = 507
Width = 965
Panels = <>
end
object OutputMemo: TMemo
Left = 343
Height = 501
Top = 3
Width = 619
Align = alClient
BorderSpacing.Around = 3
Lines.Strings = (
'To convert images, either drag and drop folders or press the ''Select Files'' button'
)
ReadOnly = True
ScrollBars = ssAutoBoth
TabOrder = 2
TabStop = False
WordWrap = False
end
object OutputDirDialog: TSelectDirectoryDialog
left = 272
top = 240
end
object InputDirDialog: TSelectDirectoryDialog
left = 272
top = 296
end
end