[MINC-users] Can MINC tools be used to crop a dataset?

Claude LEPAGE claude at bic.mni.mcgill.ca
Wed Jun 23 14:37:55 EDT 2021


Hi Sean,

I feel I know an answer for this.

% mincbbox -help

Command-specific options:
 -threshold:     Real value threshold for bounding box.
		Default value: 0
 -one_line:      Output on one line (default): start_x y z width_x y z
 -two_lines:     Output on two lines: start_x y z \n width_x y z
 -mincresample:  Output format for mincresample: (-step x y z -start x y z -nelements x y z
 -mincreshape:   Output format for mincreshape: (-start x,y,z -count dx,dy,dz
 -minccrop:      Output format for minccrop: (-xlim x1 x2 -ylim y1 y2 -zlim z1 z2
Options for logging progress. Default = -verbose.
 -verbose:       Write messages indicating progress
 -quiet:         Do not write log messages
 -debug:         Print out debug info.
Generic options for all commands:
 -help:          Print summary of command-line options and abort
 -version:       Print version number of program and exit

Usage: mincbbox [<options>] <inputfile> 
       mincbbox [-help]

You can use it in combination with -threshold and output the instructions
for use with mincresample, mincreshape or minccrop. I'll let you discover
the details. After that, I would suggest a bit of padding around the part
of the image that you want to keep (autocrop -extend).

Claude


>
> Hi MINC users,
>
> I only know how to do one or two simple things with MINC tools, but now I'm looking to do something a bit more complex, and I'm hoping someone can point me in the right direction.
>
> I have a huge dataset that, on account of its hugeness, is slow to deal with.  But in fact most of the voxels are just emptiness.  Is it possible for me to specify a range in x,y,z of voxels that I want to keep and then create a new smaller MINC file?
>
> Thanks,
>
> Sean
>


More information about the MINC-users mailing list