@@ -1457,77 +1457,102 @@ def _gen_filename(self, name):
1457
1457
1458
1458
class RobustRegisterInputSpec (FSTraitedSpec ):
1459
1459
1460
- source_file = File (mandatory = True , argstr = '--mov %s' ,
1460
+ source_file = File (exists = True , mandatory = True , argstr = '--mov %s' ,
1461
1461
desc = 'volume to be registered' )
1462
- target_file = File (mandatory = True , argstr = '--dst %s' ,
1462
+ target_file = File (exists = True , mandatory = True , argstr = '--dst %s' ,
1463
1463
desc = 'target volume for the registration' )
1464
1464
out_reg_file = traits .Either (
1465
1465
True , File , default = True , usedefault = True , argstr = '--lta %s' ,
1466
1466
desc = 'registration file; either True or filename' )
1467
- registered_file = traits .Either (traits .Bool , File , argstr = '--warp %s' ,
1468
- desc = 'registered image; either True or filename' )
1469
- weights_file = traits .Either (traits .Bool , File , argstr = '--weights %s' ,
1470
- desc = 'weights image to write; either True or filename' )
1471
- est_int_scale = traits .Bool (argstr = '--iscale' ,
1472
- desc = 'estimate intensity scale (recommended for unnormalized images)' )
1467
+ registered_file = traits .Either (
1468
+ traits .Bool , File , argstr = '--warp %s' ,
1469
+ desc = 'registered image; either True or filename' )
1470
+ weights_file = traits .Either (
1471
+ traits .Bool , File , argstr = '--weights %s' ,
1472
+ desc = 'weights image to write; either True or filename' )
1473
+ est_int_scale = traits .Bool (
1474
+ argstr = '--iscale' ,
1475
+ desc = 'estimate intensity scale (recommended for unnormalized images)' )
1473
1476
trans_only = traits .Bool (argstr = '--transonly' ,
1474
1477
desc = 'find 3 parameter translation only' )
1475
1478
in_xfm_file = File (exists = True , argstr = '--transform' ,
1476
1479
desc = 'use initial transform on source' )
1477
- half_source = traits .Either (traits .Bool , File , argstr = '--halfmov %s' ,
1478
- desc = "write source volume mapped to halfway space" )
1479
- half_targ = traits .Either (traits .Bool , File , argstr = "--halfdst %s" ,
1480
- desc = "write target volume mapped to halfway space" )
1481
- half_weights = traits .Either (traits .Bool , File , argstr = "--halfweights %s" ,
1482
- desc = "write weights volume mapped to halfway space" )
1483
- half_source_xfm = traits .Either (traits .Bool , File , argstr = "--halfmovlta %s" ,
1484
- desc = "write transform from source to halfway space" )
1485
- half_targ_xfm = traits .Either (traits .Bool , File , argstr = "--halfdstlta %s" ,
1486
- desc = "write transform from target to halfway space" )
1487
- auto_sens = traits .Bool (argstr = '--satit' , xor = ['outlier_sens' ], mandatory = True ,
1488
- desc = 'auto-detect good sensitivity' )
1489
- outlier_sens = traits .Float (argstr = '--sat %.4f' , xor = ['auto_sens' ], mandatory = True ,
1490
- desc = 'set outlier sensitivity explicitly' )
1491
- least_squares = traits .Bool (argstr = '--leastsquares' ,
1492
- desc = 'use least squares instead of robust estimator' )
1480
+ half_source = traits .Either (
1481
+ traits .Bool , File , argstr = '--halfmov %s' ,
1482
+ desc = "write source volume mapped to halfway space" )
1483
+ half_targ = traits .Either (
1484
+ traits .Bool , File , argstr = "--halfdst %s" ,
1485
+ desc = "write target volume mapped to halfway space" )
1486
+ half_weights = traits .Either (
1487
+ traits .Bool , File , argstr = "--halfweights %s" ,
1488
+ desc = "write weights volume mapped to halfway space" )
1489
+ half_source_xfm = traits .Either (
1490
+ traits .Bool , File , argstr = "--halfmovlta %s" ,
1491
+ desc = "write transform from source to halfway space" )
1492
+ half_targ_xfm = traits .Either (
1493
+ traits .Bool , File , argstr = "--halfdstlta %s" ,
1494
+ desc = "write transform from target to halfway space" )
1495
+ auto_sens = traits .Bool (
1496
+ argstr = '--satit' , xor = ['outlier_sens' ], mandatory = True ,
1497
+ desc = 'auto-detect good sensitivity' )
1498
+ outlier_sens = traits .Float (
1499
+ argstr = '--sat %.4f' , xor = ['auto_sens' ], mandatory = True ,
1500
+ desc = 'set outlier sensitivity explicitly' )
1501
+ least_squares = traits .Bool (
1502
+ argstr = '--leastsquares' ,
1503
+ desc = 'use least squares instead of robust estimator' )
1493
1504
no_init = traits .Bool (argstr = '--noinit' , desc = 'skip transform init' )
1494
- init_orient = traits .Bool (argstr = '--initorient' ,
1495
- desc = 'use moments for initial orient (recommended for stripped brains)' )
1505
+ init_orient = traits .Bool (
1506
+ argstr = '--initorient' ,
1507
+ desc = 'use moments for initial orient (recommended for stripped brains)'
1508
+ )
1496
1509
max_iterations = traits .Int (argstr = '--maxit %d' ,
1497
1510
desc = 'maximum # of times on each resolution' )
1498
1511
high_iterations = traits .Int (argstr = '--highit %d' ,
1499
1512
desc = 'max # of times on highest resolution' )
1500
- iteration_thresh = traits .Float (argstr = '--epsit %.3f' ,
1501
- desc = 'stop iterations when below threshold' )
1502
- subsample_thresh = traits .Int (argstr = '--subsample %d' ,
1503
- desc = 'subsample if dimension is above threshold size' )
1513
+ iteration_thresh = traits .Float (
1514
+ argstr = '--epsit %.3f' , desc = 'stop iterations when below threshold' )
1515
+ subsample_thresh = traits .Int (
1516
+ argstr = '--subsample %d' ,
1517
+ desc = 'subsample if dimension is above threshold size' )
1504
1518
outlier_limit = traits .Float (argstr = '--wlimit %.3f' ,
1505
1519
desc = 'set maximal outlier limit in satit' )
1506
- write_vo2vox = traits .Bool (argstr = '--vox2vox' ,
1507
- desc = 'output vox2vox matrix (default is RAS2RAS)' )
1508
- no_multi = traits .Bool (argstr = '--nomulti' , desc = 'work on highest resolution' )
1520
+ write_vo2vox = traits .Bool (
1521
+ argstr = '--vox2vox' , desc = 'output vox2vox matrix (default is RAS2RAS)' )
1522
+ no_multi = traits .Bool (argstr = '--nomulti' ,
1523
+ desc = 'work on highest resolution' )
1509
1524
mask_source = File (exists = True , argstr = '--maskmov %s' ,
1510
1525
desc = 'image to mask source volume with' )
1511
1526
mask_target = File (exists = True , argstr = '--maskdst %s' ,
1512
1527
desc = 'image to mask target volume with' )
1513
- force_double = traits .Bool (argstr = '--doubleprec' , desc = 'use double-precision intensities' )
1514
- force_float = traits .Bool (argstr = '--floattype' , desc = 'use float intensities' )
1528
+ force_double = traits .Bool (argstr = '--doubleprec' ,
1529
+ desc = 'use double-precision intensities' )
1530
+ force_float = traits .Bool (argstr = '--floattype' ,
1531
+ desc = 'use float intensities' )
1515
1532
1516
1533
1517
1534
class RobustRegisterOutputSpec (TraitedSpec ):
1518
1535
1519
1536
out_reg_file = File (exists = True , desc = "output registration file" )
1520
- registered_file = File (desc = "output image with registration applied" )
1521
- weights_file = File (desc = "image of weights used" )
1522
- half_source = File (desc = "source image mapped to halfway space" )
1523
- half_targ = File (desc = "target image mapped to halfway space" )
1524
- half_weights = File (desc = "weights image mapped to halfway space" )
1525
- half_source_xfm = File (desc = "transform file to map source image to halfway space" )
1526
- half_targ_xfm = File (desc = "transform file to map target image to halfway space" )
1537
+ registered_file = File (exists = True ,
1538
+ desc = "output image with registration applied" )
1539
+ weights_file = File (exists = True , desc = "image of weights used" )
1540
+ half_source = File (exists = True ,
1541
+ desc = "source image mapped to halfway space" )
1542
+ half_targ = File (exists = True , desc = "target image mapped to halfway space" )
1543
+ half_weights = File (exists = True ,
1544
+ desc = "weights image mapped to halfway space" )
1545
+ half_source_xfm = File (
1546
+ exists = True ,
1547
+ desc = "transform file to map source image to halfway space" )
1548
+ half_targ_xfm = File (
1549
+ exists = True ,
1550
+ desc = "transform file to map target image to halfway space" )
1527
1551
1528
1552
1529
1553
class RobustRegister (FSCommand ):
1530
- """Perform intramodal linear registration (translation and rotation) using robust statistics.
1554
+ """Perform intramodal linear registration (translation and rotation) using
1555
+ robust statistics.
1531
1556
1532
1557
Examples
1533
1558
--------
@@ -1542,8 +1567,8 @@ class RobustRegister(FSCommand):
1542
1567
1543
1568
References
1544
1569
----------
1545
- Reuter, M, Rosas, HD, and Fischl, B, (2010). Highly Accurate Inverse Consistent Registration:
1546
- A Robust Approach. Neuroimage 53(4) 1181-96.
1570
+ Reuter, M, Rosas, HD, and Fischl, B, (2010). Highly Accurate Inverse
1571
+ Consistent Registration: A Robust Approach. Neuroimage 53(4) 1181-96.
1547
1572
1548
1573
"""
1549
1574
0 commit comments