Ejemplo n.º 1
0
def test_SliceTimer_outputs():
    output_map = dict(slice_time_corrected_file=dict(), )
    outputs = SliceTimer.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
Ejemplo n.º 2
0
def test_SliceTimer_outputs():
    output_map = dict(slice_time_corrected_file=dict(),
    )
    outputs = SliceTimer.output_spec()

    for key, metadata in output_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(outputs.traits()[key], metakey), value
Ejemplo n.º 3
0
def test_SliceTimer_inputs():
    input_map = dict(ignore_exception=dict(nohash=True,
    usedefault=True,
    ),
    index_dir=dict(argstr='--down',
    ),
    args=dict(argstr='%s',
    ),
    out_file=dict(argstr='--out=%s',
    hash_files=False,
    genfile=True,
    ),
    custom_timings=dict(argstr='--tcustom=%s',
    ),
    time_repetition=dict(argstr='--repeat=%f',
    ),
    slice_direction=dict(argstr='--direction=%d',
    ),
    custom_order=dict(argstr='--ocustom=%s',
    ),
    terminal_output=dict(mandatory=True,
    nohash=True,
    ),
    environ=dict(nohash=True,
    usedefault=True,
    ),
    in_file=dict(position=0,
    mandatory=True,
    argstr='--in=%s',
    ),
    global_shift=dict(argstr='--tglobal',
    ),
    output_type=dict(),
    interleaved=dict(argstr='--odd',
    ),
    )
    inputs = SliceTimer.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
Ejemplo n.º 4
0
def test_SliceTimer_inputs():
    input_map = dict(
        args=dict(argstr='%s', ),
        custom_order=dict(argstr='--ocustom=%s', ),
        custom_timings=dict(argstr='--tcustom=%s', ),
        environ=dict(
            nohash=True,
            usedefault=True,
        ),
        global_shift=dict(argstr='--tglobal', ),
        ignore_exception=dict(
            nohash=True,
            usedefault=True,
        ),
        in_file=dict(
            argstr='--in=%s',
            mandatory=True,
            position=0,
        ),
        index_dir=dict(argstr='--down', ),
        interleaved=dict(argstr='--odd', ),
        out_file=dict(
            argstr='--out=%s',
            genfile=True,
            hash_files=False,
        ),
        output_type=dict(),
        slice_direction=dict(argstr='--direction=%d', ),
        terminal_output=dict(
            mandatory=True,
            nohash=True,
        ),
        time_repetition=dict(argstr='--repeat=%f', ),
    )
    inputs = SliceTimer.input_spec()

    for key, metadata in input_map.items():
        for metakey, value in metadata.items():
            yield assert_equal, getattr(inputs.traits()[key], metakey), value
Ejemplo n.º 5
0
# Reorient to standard space using FSL
reorientfunc = Node(Reorient2Std(), name='reorientfunc')
reorientstruct = Node(Reorient2Std(), name='reorientstruct')

# Reslice- using MRI_convert
reslice = Node(MRIConvert(vox_size=resampled_voxel_size, out_type='nii'),
               name='reslice')

# Segment structural scan
#segment = Node(Segment(affine_regularization='none'), name='segment')
segment = Node(FAST(no_bias=True, segments=True, number_classes=3),
               name='segment')

#Slice timing correction based on interleaved acquisition using FSL
slicetime_correct = Node(SliceTimer(interleaved=interleave,
                                    slice_direction=slice_dir,
                                    time_repetition=TR),
                         name='slicetime_correct')

# Motion correction
motion_correct = Node(MCFLIRT(save_plots=True, mean_vol=True),
                      name='motion_correct')

# Registration- using FLIRT
# The BOLD image is 'in_file', the anat is 'reference', the output is 'out_file'
coreg1 = Node(FLIRT(), name='coreg1')
coreg2 = Node(FLIRT(apply_xfm=True), name='coreg2')

# make binary mask
# structural is the 'in_file', output is 'binary_file'
binarize_struct = Node(Binarize(dilate=mask_dilation,