Section: User Contributed Perl Documentation (1)Updated: 2010-10-17Local indexUp
NAME
minccomplete - checks if a MINC file is complete
SYNOPSIS
minccomplete [options] <file.mnc>
minccomplete is designed as a QC tool that you can use to check
if MINC or xfm files have been completely written.
DESCRIPTION
minccomplete will check if a file exists and is completely written.
The reasons for non-completion are varied but typically caused when
a process writing a MINC or xfm file is interrupted. A zero will be
returned if the file is complete and a -1 if it isn't.
Examples:
$ minccomplete in.mnc
0
$ minccomplete in.xfm
0
A MINC file is returned as complete if the image attribute image:complete
is set. ie:
mincinfo -attvalue image:complete infile.mnc
A xfm file is deemed complete if xfm2param can parse the file.
The associated exit codes will also be set as part of this so
that minccomplete can be used in scripts.
An entirely simplistic example:
#! /bin/sh
infile=$1
if [ `minccomplete ${infile}` ]
then
echo "Yes!"
else
echo "Nope, try again"
fi