cmind.pipeline.cmind_crop_robust¶
Functions
cmind_crop_robust (fname, fname_crop[, ...]) |
utility to reduce FOV in S/I direction, removing some of the neck |
-
cmind.pipeline.cmind_crop_robust.
cmind_crop_robust
(fname, fname_crop, age_months=252, z_crop_mm=None, oname_root='T1W', minthresh=0.03, fname2=None, fname2_crop=None, oname2_root='T2W', generate_figures=True, ForceUpdate=False, verbose=False, logger=None)[source]¶ utility to reduce FOV in S/I direction, removing some of the neck
Parameters: fname : str
input filename
fname_crop : str
output filename. if a directory name is given instead, a file named `oname_root`+_Structural_Crop.nii.gz will be created in that folder
age_months : float
subject age in months
z_crop_mm : int, optional
size to crop to in mm. If specified overrides the automatic setting via age_months
oname_root : str, optional
output filename prefix
minthresh : float, optional
percentage threshold below which to consider intensities to be noise. This is used when detecting the number of “empty” slices above the head.
fname2 : str, optional
second input file to apply the identical fslroi crop to
fname2_crop : str, optional
output filename for the second input
oname2_root : str, optional
output filename prefix for fname2
generate_figures : bool, optional
if true, generate additional summary images
ForceUpdate : bool,optional
if True, rerun and overwrite any previously existing results
verbose : bool, optional
print additional output (to terminal and log)
logger : logging.Logger or str, optional
logging.Logger object (or string of a filename to log to)
Returns: fname_crop : str
filename of the cropped image
Notes
Crops the FOV in S/I direction by an age-dependent amount. This is a rough crop and is not intended to remove all of the neck, etc.
T1-weighted head prior to crop
T1-weighted head after crop