Skip to content

Commit b9039d6

Browse files
authored
Merge branch 'add_pet_freesurfer' into add_pet_freesurfer
2 parents 2c0e384 + ea8e89d commit b9039d6

File tree

3 files changed

+21
-40
lines changed

3 files changed

+21
-40
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,13 @@ class GLMFitInputSpec(FSTraitedSpec):
407407
desc="Reference time activity curve and frame times",
408408
)
409409
mrtm2 = InputMultiPath(
410-
traits.Tuple(File(exists=True), File(exists=True), File(exists=True)),
411-
argstr="--mrtm2 %s %s %s...",
410+
traits.Tuple(File(exists=True), File(exists=True), traits.Float),
411+
argstr="--mrtm2 %s %s %f...",
412412
desc="Reference time activity curve, frame times and k2p",
413413
)
414414
logan = InputMultiPath(
415-
traits.Tuple(File(exists=True), File(exists=True), File(exists=True)),
416-
argstr="--logan %s %s %s...",
415+
traits.Tuple(File(exists=True), File(exists=True), traits.Float),
416+
argstr="--logan %s %s %f...",
417417
desc="Reference time activity curve, frame times and tstar",
418418
)
419419
force_perm = traits.Bool(

nipype/interfaces/freesurfer/petsurfer.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ class MRTM(GLMFit):
471471

472472
def _list_outputs(self):
473473
outputs = self.output_spec().get()
474+
outputs['k2p'] = os.join(self.inputs.glm_dir, 'k2prime.dat')
474475
return outputs
475476

476477
class MRTM2InputSpec(GLMFitInputSpec):
@@ -493,9 +494,13 @@ class MRTM2InputSpec(GLMFitInputSpec):
493494
desc='save outputs as nii.gz',
494495
xor=_ext_xor
495496
)
497+
yhat_save = traits.Bool(
498+
argstr="--save-yhat", desc="save signal estimate (yhat)"
499+
)
496500

497501
class MRTM2OutputSpec(GLMFitInputSpec):
498502
bp = File(desc="BP estimates")
503+
yhat = File(desc="Fitted values (yhat) to the TACs")
499504

500505
class MRTM2(GLMFit):
501506
"""Perform MRTM2 kinetic modeling.
@@ -521,6 +526,7 @@ def _list_outputs(self):
521526
else:
522527
ext = '.mgh'
523528
outputs['bp'] = os.path.join(self.inputs.glm_dir, 'bp', ext)
529+
outputs['yhat'] = os.path.join(self.inputs.glm_dir, 'yhat', ext)
524530
return outputs
525531

526532
class LoganRefInputSpec(GLMFitInputSpec):
@@ -547,6 +553,16 @@ class LoganRefOutputSpec(GLMFitInputSpec):
547553
bp = File(desc="BP estimates")
548554

549555
class LoganRef(GLMFit):
556+
"""Perform Logan reference kinetic modeling.
557+
Examples
558+
--------
559+
>>> logan = LoganRef()
560+
>>> logan.inputs.in_file = 'tac.nii'
561+
>>> logan.inputs.logan = [('ref_tac.dat', 'timing.dat', 2600)]
562+
>>> logan.inputs.glmdir = 'logan'
563+
>>> logan.cmdline == 'mri_glmfit --glmdir logan --y tac.nii --logan ref_tac.dat timing.dat 2600'
564+
"""
565+
550566
_cmd = "mri_glmfit"
551567
input_spec = LoganRefInputSpec
552568
output_spec = LoganRefOutputSpec

nipype/interfaces/freesurfer/preprocess.py

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3379,39 +3379,4 @@ class ConcatenateLTA(FSCommand):
33793379
def _format_arg(self, name, spec, value):
33803380
if name == "out_type":
33813381
value = {"VOX2VOX": 0, "RAS2RAS": 1}[value]
3382-
return super(ConcatenateLTA, self)._format_arg(name, spec, value)
3383-
3384-
class MRIGtmSegInputSpec(FSTraitedSpec):
3385-
subject_id = traits.Str(
3386-
argstr="--s %s", desc="freesurfer subject id", mandatory=True
3387-
)
3388-
3389-
3390-
class MRIGtmSeg(FSCommand):
3391-
"""
3392-
This program performs a high-resolution segmentation to be used for PET partial volume correction.
3393-
3394-
3395-
Examples
3396-
========
3397-
>>> '
3398-
"""
3399-
3400-
_cmd = "mri_gtmseg"
3401-
input_spec = MRIGtmSegInputSpec
3402-
3403-
3404-
class MRIGtmPVC(FSCommand):
3405-
"""
3406-
This program performs partial volume correction using the output from gtmseg.
3407-
3408-
3409-
Examples
3410-
========
3411-
>>> '
3412-
"""
3413-
3414-
_cmd = "mri_gtmpvc"
3415-
3416-
3417-
3382+
return super(ConcatenateLTA, self)._format_arg(name, spec, value)

0 commit comments

Comments
 (0)