-
Notifications
You must be signed in to change notification settings - Fork 521
/
specialized.py
657 lines (597 loc) · 25.1 KB
/
specialized.py
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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# -*- coding: utf-8 -*-
# -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
from nipype.interfaces.base import (
CommandLine,
CommandLineInputSpec,
SEMLikeCommandLine,
TraitedSpec,
File,
Directory,
traits,
isdefined,
InputMultiPath,
OutputMultiPath,
)
import os
class ACPCTransformInputSpec(CommandLineInputSpec):
acpc = InputMultiPath(
traits.List(traits.Float(), minlen=3, maxlen=3),
desc="ACPC line, two fiducial points, one at the anterior commissure and one at the posterior commissure.",
argstr="--acpc %s...",
)
midline = InputMultiPath(
traits.List(traits.Float(), minlen=3, maxlen=3),
desc="The midline is a series of points defining the division between the hemispheres of the brain (the mid sagittal plane).",
argstr="--midline %s...",
)
outputTransform = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="A transform filled in from the ACPC and Midline registration calculation",
argstr="--outputTransform %s",
)
debugSwitch = traits.Bool(
desc="Click if wish to see debugging output", argstr="--debugSwitch "
)
class ACPCTransformOutputSpec(TraitedSpec):
outputTransform = File(
desc="A transform filled in from the ACPC and Midline registration calculation",
exists=True,
)
class ACPCTransform(SEMLikeCommandLine):
"""title: ACPC Transform
category: Registration.Specialized
description: <p>Calculate a transformation from two lists of fiducial points.</p><p>ACPC line is two fiducial points, one at the anterior commissure and one at the posterior commissure. The resulting transform will bring the line connecting them to horizontal to the AP axis.</p><p>The midline is a series of points defining the division between the hemispheres of the brain (the mid sagittal plane). The resulting transform will put the output volume with the mid sagittal plane lined up with the AS plane.</p><p>Use the Filtering module<b>Resample Scalar/Vector/DWI Volume</b>to apply the transformation to a volume.</p>
version: 1.0
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/ACPCTransform
license: slicer3
contributor: Nicole Aucoin (SPL, BWH), Ron Kikinis (SPL, BWH)
acknowledgements: This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
"""
input_spec = ACPCTransformInputSpec
output_spec = ACPCTransformOutputSpec
_cmd = "ACPCTransform "
_outputs_filenames = {"outputTransform": "outputTransform.mat"}
class FiducialRegistrationInputSpec(CommandLineInputSpec):
fixedLandmarks = InputMultiPath(
traits.List(traits.Float(), minlen=3, maxlen=3),
desc="Ordered list of landmarks in the fixed image",
argstr="--fixedLandmarks %s...",
)
movingLandmarks = InputMultiPath(
traits.List(traits.Float(), minlen=3, maxlen=3),
desc="Ordered list of landmarks in the moving image",
argstr="--movingLandmarks %s...",
)
saveTransform = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Save the transform that results from registration",
argstr="--saveTransform %s",
)
transformType = traits.Enum(
"Translation",
"Rigid",
"Similarity",
desc="Type of transform to produce",
argstr="--transformType %s",
)
rms = traits.Float(desc="Display RMS Error.", argstr="--rms %f")
outputMessage = traits.Str(
desc="Provides more information on the output", argstr="--outputMessage %s"
)
class FiducialRegistrationOutputSpec(TraitedSpec):
saveTransform = File(
desc="Save the transform that results from registration", exists=True
)
class FiducialRegistration(SEMLikeCommandLine):
"""title: Fiducial Registration
category: Registration.Specialized
description: Computes a rigid, similarity or affine transform from a matched list of fiducials
version: 0.1.0.$Revision$
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.1/Modules/TransformFromFiducials
contributor: Casey B Goodlett (Kitware), Dominik Meier (SPL, BWH)
acknowledgements: This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
"""
input_spec = FiducialRegistrationInputSpec
output_spec = FiducialRegistrationOutputSpec
_cmd = "FiducialRegistration "
_outputs_filenames = {"saveTransform": "saveTransform.txt"}
class VBRAINSDemonWarpInputSpec(CommandLineInputSpec):
movingVolume = InputMultiPath(
File(exists=True),
desc="Required: input moving image",
argstr="--movingVolume %s...",
)
fixedVolume = InputMultiPath(
File(exists=True),
desc="Required: input fixed (target) image",
argstr="--fixedVolume %s...",
)
inputPixelType = traits.Enum(
"float",
"short",
"ushort",
"int",
"uchar",
desc="Input volumes will be typecast to this format: float|short|ushort|int|uchar",
argstr="--inputPixelType %s",
)
outputVolume = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Required: output resampled moving image (will have the same physical space as the fixedVolume).",
argstr="--outputVolume %s",
)
outputDisplacementFieldVolume = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Output deformation field vector image (will have the same physical space as the fixedVolume).",
argstr="--outputDisplacementFieldVolume %s",
)
outputPixelType = traits.Enum(
"float",
"short",
"ushort",
"int",
"uchar",
desc="outputVolume will be typecast to this format: float|short|ushort|int|uchar",
argstr="--outputPixelType %s",
)
interpolationMode = traits.Enum(
"NearestNeighbor",
"Linear",
"ResampleInPlace",
"BSpline",
"WindowedSinc",
"Hamming",
"Cosine",
"Welch",
"Lanczos",
"Blackman",
desc="Type of interpolation to be used when applying transform to moving volume. Options are Linear, ResampleInPlace, NearestNeighbor, BSpline, or WindowedSinc",
argstr="--interpolationMode %s",
)
registrationFilterType = traits.Enum(
"Demons",
"FastSymmetricForces",
"Diffeomorphic",
"LogDemons",
"SymmetricLogDemons",
desc="Registration Filter Type: Demons|FastSymmetricForces|Diffeomorphic|LogDemons|SymmetricLogDemons",
argstr="--registrationFilterType %s",
)
smoothDisplacementFieldSigma = traits.Float(
desc="A gaussian smoothing value to be applied to the deformation feild at each iteration.",
argstr="--smoothDisplacementFieldSigma %f",
)
numberOfPyramidLevels = traits.Int(
desc="Number of image pyramid levels to use in the multi-resolution registration.",
argstr="--numberOfPyramidLevels %d",
)
minimumFixedPyramid = InputMultiPath(
traits.Int,
desc="The shrink factor for the first level of the fixed image pyramid. (i.e. start at 1/16 scale, then 1/8, then 1/4, then 1/2, and finally full scale)",
sep=",",
argstr="--minimumFixedPyramid %s",
)
minimumMovingPyramid = InputMultiPath(
traits.Int,
desc="The shrink factor for the first level of the moving image pyramid. (i.e. start at 1/16 scale, then 1/8, then 1/4, then 1/2, and finally full scale)",
sep=",",
argstr="--minimumMovingPyramid %s",
)
arrayOfPyramidLevelIterations = InputMultiPath(
traits.Int,
desc="The number of iterations for each pyramid level",
sep=",",
argstr="--arrayOfPyramidLevelIterations %s",
)
histogramMatch = traits.Bool(
desc="Histogram Match the input images. This is suitable for images of the same modality that may have different absolute scales, but the same overall intensity profile.",
argstr="--histogramMatch ",
)
numberOfHistogramBins = traits.Int(
desc="The number of histogram levels", argstr="--numberOfHistogramBins %d"
)
numberOfMatchPoints = traits.Int(
desc="The number of match points for histrogramMatch",
argstr="--numberOfMatchPoints %d",
)
medianFilterSize = InputMultiPath(
traits.Int,
desc="Median filter radius in all 3 directions. When images have a lot of salt and pepper noise, this step can improve the registration.",
sep=",",
argstr="--medianFilterSize %s",
)
initializeWithDisplacementField = File(
desc="Initial deformation field vector image file name",
exists=True,
argstr="--initializeWithDisplacementField %s",
)
initializeWithTransform = File(
desc="Initial Transform filename",
exists=True,
argstr="--initializeWithTransform %s",
)
makeBOBF = traits.Bool(
desc="Flag to make Brain-Only Background-Filled versions of the input and target volumes.",
argstr="--makeBOBF ",
)
fixedBinaryVolume = File(
desc="Mask filename for desired region of interest in the Fixed image.",
exists=True,
argstr="--fixedBinaryVolume %s",
)
movingBinaryVolume = File(
desc="Mask filename for desired region of interest in the Moving image.",
exists=True,
argstr="--movingBinaryVolume %s",
)
lowerThresholdForBOBF = traits.Int(
desc="Lower threshold for performing BOBF", argstr="--lowerThresholdForBOBF %d"
)
upperThresholdForBOBF = traits.Int(
desc="Upper threshold for performing BOBF", argstr="--upperThresholdForBOBF %d"
)
backgroundFillValue = traits.Int(
desc="Replacement value to overwrite background when performing BOBF",
argstr="--backgroundFillValue %d",
)
seedForBOBF = InputMultiPath(
traits.Int,
desc="coordinates in all 3 directions for Seed when performing BOBF",
sep=",",
argstr="--seedForBOBF %s",
)
neighborhoodForBOBF = InputMultiPath(
traits.Int,
desc="neighborhood in all 3 directions to be included when performing BOBF",
sep=",",
argstr="--neighborhoodForBOBF %s",
)
outputDisplacementFieldPrefix = traits.Str(
desc="Displacement field filename prefix for writing separate x, y, and z component images",
argstr="--outputDisplacementFieldPrefix %s",
)
outputCheckerboardVolume = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Genete a checkerboard image volume between the fixedVolume and the deformed movingVolume.",
argstr="--outputCheckerboardVolume %s",
)
checkerboardPatternSubdivisions = InputMultiPath(
traits.Int,
desc="Number of Checkerboard subdivisions in all 3 directions",
sep=",",
argstr="--checkerboardPatternSubdivisions %s",
)
outputNormalized = traits.Bool(
desc="Flag to warp and write the normalized images to output. In normalized images the image values are fit-scaled to be between 0 and the maximum storage type value.",
argstr="--outputNormalized ",
)
outputDebug = traits.Bool(
desc="Flag to write debugging images after each step.", argstr="--outputDebug "
)
weightFactors = InputMultiPath(
traits.Float,
desc="Weight fatctors for each input images",
sep=",",
argstr="--weightFactors %s",
)
gradient_type = traits.Enum(
"0",
"1",
"2",
desc="Type of gradient used for computing the demons force (0 is symmetrized, 1 is fixed image, 2 is moving image)",
argstr="--gradient_type %s",
)
upFieldSmoothing = traits.Float(
desc="Smoothing sigma for the update field at each iteration",
argstr="--upFieldSmoothing %f",
)
max_step_length = traits.Float(
desc="Maximum length of an update vector (0: no restriction)",
argstr="--max_step_length %f",
)
use_vanilla_dem = traits.Bool(
desc="Run vanilla demons algorithm", argstr="--use_vanilla_dem "
)
gui = traits.Bool(
desc="Display intermediate image volumes for debugging", argstr="--gui "
)
promptUser = traits.Bool(
desc="Prompt the user to hit enter each time an image is sent to the DebugImageViewer",
argstr="--promptUser ",
)
numberOfBCHApproximationTerms = traits.Int(
desc="Number of terms in the BCH expansion",
argstr="--numberOfBCHApproximationTerms %d",
)
numberOfThreads = traits.Int(
desc="Explicitly specify the maximum number of threads to use.",
argstr="--numberOfThreads %d",
)
class VBRAINSDemonWarpOutputSpec(TraitedSpec):
outputVolume = File(
desc="Required: output resampled moving image (will have the same physical space as the fixedVolume).",
exists=True,
)
outputDisplacementFieldVolume = File(
desc="Output deformation field vector image (will have the same physical space as the fixedVolume).",
exists=True,
)
outputCheckerboardVolume = File(
desc="Genete a checkerboard image volume between the fixedVolume and the deformed movingVolume.",
exists=True,
)
class VBRAINSDemonWarp(SEMLikeCommandLine):
"""title: Vector Demon Registration (BRAINS)
category: Registration.Specialized
description:
This program finds a deformation field to warp a moving image onto a fixed image. The images must be of the same signal kind, and contain an image of the same kind of object. This program uses the Thirion Demons warp software in ITK, the Insight Toolkit. Additional information is available at: http://www.nitrc.org/projects/brainsdemonwarp.
version: 3.0.0
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Modules:BRAINSDemonWarp
license: https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt
contributor: This tool was developed by Hans J. Johnson and Greg Harris.
acknowledgements: The development of this tool was supported by funding from grants NS050568 and NS40068 from the National Institute of Neurological Disorders and Stroke and grants MH31593, MH40856, from the National Institute of Mental Health.
"""
input_spec = VBRAINSDemonWarpInputSpec
output_spec = VBRAINSDemonWarpOutputSpec
_cmd = "VBRAINSDemonWarp "
_outputs_filenames = {
"outputVolume": "outputVolume.nii",
"outputCheckerboardVolume": "outputCheckerboardVolume.nii",
"outputDisplacementFieldVolume": "outputDisplacementFieldVolume.nrrd",
}
class BRAINSDemonWarpInputSpec(CommandLineInputSpec):
movingVolume = File(
desc="Required: input moving image", exists=True, argstr="--movingVolume %s"
)
fixedVolume = File(
desc="Required: input fixed (target) image",
exists=True,
argstr="--fixedVolume %s",
)
inputPixelType = traits.Enum(
"float",
"short",
"ushort",
"int",
"uchar",
desc="Input volumes will be typecast to this format: float|short|ushort|int|uchar",
argstr="--inputPixelType %s",
)
outputVolume = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Required: output resampled moving image (will have the same physical space as the fixedVolume).",
argstr="--outputVolume %s",
)
outputDisplacementFieldVolume = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Output deformation field vector image (will have the same physical space as the fixedVolume).",
argstr="--outputDisplacementFieldVolume %s",
)
outputPixelType = traits.Enum(
"float",
"short",
"ushort",
"int",
"uchar",
desc="outputVolume will be typecast to this format: float|short|ushort|int|uchar",
argstr="--outputPixelType %s",
)
interpolationMode = traits.Enum(
"NearestNeighbor",
"Linear",
"ResampleInPlace",
"BSpline",
"WindowedSinc",
"Hamming",
"Cosine",
"Welch",
"Lanczos",
"Blackman",
desc="Type of interpolation to be used when applying transform to moving volume. Options are Linear, ResampleInPlace, NearestNeighbor, BSpline, or WindowedSinc",
argstr="--interpolationMode %s",
)
registrationFilterType = traits.Enum(
"Demons",
"FastSymmetricForces",
"Diffeomorphic",
desc="Registration Filter Type: Demons|FastSymmetricForces|Diffeomorphic",
argstr="--registrationFilterType %s",
)
smoothDisplacementFieldSigma = traits.Float(
desc="A gaussian smoothing value to be applied to the deformation feild at each iteration.",
argstr="--smoothDisplacementFieldSigma %f",
)
numberOfPyramidLevels = traits.Int(
desc="Number of image pyramid levels to use in the multi-resolution registration.",
argstr="--numberOfPyramidLevels %d",
)
minimumFixedPyramid = InputMultiPath(
traits.Int,
desc="The shrink factor for the first level of the fixed image pyramid. (i.e. start at 1/16 scale, then 1/8, then 1/4, then 1/2, and finally full scale)",
sep=",",
argstr="--minimumFixedPyramid %s",
)
minimumMovingPyramid = InputMultiPath(
traits.Int,
desc="The shrink factor for the first level of the moving image pyramid. (i.e. start at 1/16 scale, then 1/8, then 1/4, then 1/2, and finally full scale)",
sep=",",
argstr="--minimumMovingPyramid %s",
)
arrayOfPyramidLevelIterations = InputMultiPath(
traits.Int,
desc="The number of iterations for each pyramid level",
sep=",",
argstr="--arrayOfPyramidLevelIterations %s",
)
histogramMatch = traits.Bool(
desc="Histogram Match the input images. This is suitable for images of the same modality that may have different absolute scales, but the same overall intensity profile.",
argstr="--histogramMatch ",
)
numberOfHistogramBins = traits.Int(
desc="The number of histogram levels", argstr="--numberOfHistogramBins %d"
)
numberOfMatchPoints = traits.Int(
desc="The number of match points for histrogramMatch",
argstr="--numberOfMatchPoints %d",
)
medianFilterSize = InputMultiPath(
traits.Int,
desc="Median filter radius in all 3 directions. When images have a lot of salt and pepper noise, this step can improve the registration.",
sep=",",
argstr="--medianFilterSize %s",
)
initializeWithDisplacementField = File(
desc="Initial deformation field vector image file name",
exists=True,
argstr="--initializeWithDisplacementField %s",
)
initializeWithTransform = File(
desc="Initial Transform filename",
exists=True,
argstr="--initializeWithTransform %s",
)
maskProcessingMode = traits.Enum(
"NOMASK",
"ROIAUTO",
"ROI",
"BOBF",
desc="What mode to use for using the masks: NOMASK|ROIAUTO|ROI|BOBF. If ROIAUTO is choosen, then the mask is implicitly defined using a otsu forground and hole filling algorithm. Where the Region Of Interest mode uses the masks to define what parts of the image should be used for computing the deformation field. Brain Only Background Fill uses the masks to pre-process the input images by clipping and filling in the background with a predefined value.",
argstr="--maskProcessingMode %s",
)
fixedBinaryVolume = File(
desc="Mask filename for desired region of interest in the Fixed image.",
exists=True,
argstr="--fixedBinaryVolume %s",
)
movingBinaryVolume = File(
desc="Mask filename for desired region of interest in the Moving image.",
exists=True,
argstr="--movingBinaryVolume %s",
)
lowerThresholdForBOBF = traits.Int(
desc="Lower threshold for performing BOBF", argstr="--lowerThresholdForBOBF %d"
)
upperThresholdForBOBF = traits.Int(
desc="Upper threshold for performing BOBF", argstr="--upperThresholdForBOBF %d"
)
backgroundFillValue = traits.Int(
desc="Replacement value to overwrite background when performing BOBF",
argstr="--backgroundFillValue %d",
)
seedForBOBF = InputMultiPath(
traits.Int,
desc="coordinates in all 3 directions for Seed when performing BOBF",
sep=",",
argstr="--seedForBOBF %s",
)
neighborhoodForBOBF = InputMultiPath(
traits.Int,
desc="neighborhood in all 3 directions to be included when performing BOBF",
sep=",",
argstr="--neighborhoodForBOBF %s",
)
outputDisplacementFieldPrefix = traits.Str(
desc="Displacement field filename prefix for writing separate x, y, and z component images",
argstr="--outputDisplacementFieldPrefix %s",
)
outputCheckerboardVolume = traits.Either(
traits.Bool,
File(),
hash_files=False,
desc="Genete a checkerboard image volume between the fixedVolume and the deformed movingVolume.",
argstr="--outputCheckerboardVolume %s",
)
checkerboardPatternSubdivisions = InputMultiPath(
traits.Int,
desc="Number of Checkerboard subdivisions in all 3 directions",
sep=",",
argstr="--checkerboardPatternSubdivisions %s",
)
outputNormalized = traits.Bool(
desc="Flag to warp and write the normalized images to output. In normalized images the image values are fit-scaled to be between 0 and the maximum storage type value.",
argstr="--outputNormalized ",
)
outputDebug = traits.Bool(
desc="Flag to write debugging images after each step.", argstr="--outputDebug "
)
gradient_type = traits.Enum(
"0",
"1",
"2",
desc="Type of gradient used for computing the demons force (0 is symmetrized, 1 is fixed image, 2 is moving image)",
argstr="--gradient_type %s",
)
upFieldSmoothing = traits.Float(
desc="Smoothing sigma for the update field at each iteration",
argstr="--upFieldSmoothing %f",
)
max_step_length = traits.Float(
desc="Maximum length of an update vector (0: no restriction)",
argstr="--max_step_length %f",
)
use_vanilla_dem = traits.Bool(
desc="Run vanilla demons algorithm", argstr="--use_vanilla_dem "
)
gui = traits.Bool(
desc="Display intermediate image volumes for debugging", argstr="--gui "
)
promptUser = traits.Bool(
desc="Prompt the user to hit enter each time an image is sent to the DebugImageViewer",
argstr="--promptUser ",
)
numberOfBCHApproximationTerms = traits.Int(
desc="Number of terms in the BCH expansion",
argstr="--numberOfBCHApproximationTerms %d",
)
numberOfThreads = traits.Int(
desc="Explicitly specify the maximum number of threads to use.",
argstr="--numberOfThreads %d",
)
class BRAINSDemonWarpOutputSpec(TraitedSpec):
outputVolume = File(
desc="Required: output resampled moving image (will have the same physical space as the fixedVolume).",
exists=True,
)
outputDisplacementFieldVolume = File(
desc="Output deformation field vector image (will have the same physical space as the fixedVolume).",
exists=True,
)
outputCheckerboardVolume = File(
desc="Genete a checkerboard image volume between the fixedVolume and the deformed movingVolume.",
exists=True,
)
class BRAINSDemonWarp(SEMLikeCommandLine):
"""title: Demon Registration (BRAINS)
category: Registration.Specialized
description:
This program finds a deformation field to warp a moving image onto a fixed image. The images must be of the same signal kind, and contain an image of the same kind of object. This program uses the Thirion Demons warp software in ITK, the Insight Toolkit. Additional information is available at: http://www.nitrc.org/projects/brainsdemonwarp.
version: 3.0.0
documentation-url: http://wiki.slicer.org/slicerWiki/index.php/Modules:BRAINSDemonWarp
license: https://www.nitrc.org/svn/brains/BuildScripts/trunk/License.txt
contributor: This tool was developed by Hans J. Johnson and Greg Harris.
acknowledgements: The development of this tool was supported by funding from grants NS050568 and NS40068 from the National Institute of Neurological Disorders and Stroke and grants MH31593, MH40856, from the National Institute of Mental Health.
"""
input_spec = BRAINSDemonWarpInputSpec
output_spec = BRAINSDemonWarpOutputSpec
_cmd = "BRAINSDemonWarp "
_outputs_filenames = {
"outputVolume": "outputVolume.nii",
"outputCheckerboardVolume": "outputCheckerboardVolume.nii",
"outputDisplacementFieldVolume": "outputDisplacementFieldVolume.nrrd",
}