# FreeBSD Manual Pages

MINCSTATS(1) MINC User's Guide MINCSTATS(1)NAMEmincstats - calculate simple statistics across voxels of a minc fileSYNOPSISmincstats[<options>] <in1>.mncDESCRIPTIONMincstatswill calculate simple statistical measures across all voxels of a minc file. Note that these are global statistical measures and not voxel-by-voxel measures (seemincaveragefor that). By default all sta- tistics are calculated. If any statistics are requested via a command- line option, then only the requested statistics are printed. A very useful feature of this program is the ability to restrict the set of voxels included in the statistic calculation, either by re- stricting the range of included values, or by using a mask file with a restricted range. Multiple ranges for the input file or mask file can be specified. For each range of included volume values, and for each range of mask values, the relevant statistics are printed out (n*m val- ues, where n is the number of volume ranges and m the number of mask ranges). These calculations are done in a single pass through the data, so specifying multiple ranges is much faster than running the program repeatedly. This is quite helpful when calculating many regional aver- ages with a VOI mask volume. Special mention should be given to histograms and related statistical measures. The default range of the histogram is from the smallest value in the file to the largest. In the not uncommon, but special, case when the number of histogram bins exactly matches the number of possible values in the file (e.g. 256 bins for full-range byte data), the his- togram can end up with some odd features when using the default his- togram range. This arises from the discretization of the data that are then rebinned into a slightly mismatched histgram. For the example of byte data, the values that should be used are 256 bins and a histogram range that extends half a bin below the smallest value and half a bin above the largest. Use option-discrete_histogramto work this out au- tomatically, or use-integer_histogramto have bins of unit width if the input data are inherently integer (e.g. label data). In general, one should be careful about the rebinning of discretized data to a his- togram with a bin size that is close to the level of discretization.OPTIONSNote that options can be specified in abbreviated form (as long as they are unique) and can be given anywhere on the command line.General options-clobberOverwrite an existing file.-noclobberDon't overwrite an existing file (default).-verbosePrint out extra information (more than the default).-quietPrint out only the requested numbers-max_buffer_size_in_kbsizeSpecify the maximum size of the internal buffers (in kbytes). Default is 4 MB.Invalid value options-ignore_nanExclude invalid values (outside valid range) from statistic cal- culations. This is the default.-include_nanTreat invalid values as zeros and include them in statistic cal- culations.-replace_nanvalueReplace invalid values with the specified value and include the new value in statistic calculations.Volume range options-floormin1,min2,... Comma-separated list of lower bounds for ranges of data to in- clude in statistic calculation.-ceilmax1,max2,... Comma-separated list of upper bounds for ranges of data to in- clude in statistic calculation.-rangemin1,max1,min2,max2,... Comma-separated list of lower and upper bounds for ranges of data to include in statistic calculation.-binvalueval1,val2,... Comma-separated list of integer values to include in statistic calculation. A range of +/- 0.5 is defined around each specified value.-maskfilename.mncName of file to be used for masking data included in statistic calculation. For this to have any effect, you must specify a mask range with one of the following options.-mask_floormin1,min2,...: Like-floor, but applied to the mask file.-mask_ceilmax1,max2,... Like-ceil, but applied to the mask file.-mask_rangemin1,max1,min2,max2,... Like-range, but applied to the mask file.-mask_binvalueval1,val2,... Like-binvalue, but applied to the mask file.Histogram options-histogramfilenameSpecify the name of a file into which the histogram is written. If multiple ranges or mask ranges are specified, then all his- tograms are written in this file, separated by blank lines. In- formation describing each histogram is written before it in lines starting with the hash (pound) character. These files can be loaded into gnuplot.-hist_binsnumber-of-binsSpecify number of bins in histogram.-binsnumber-of-binsSynonym for-hist_bins.-hist_floorminSpecify lower bound for histogram.-hist_ceilmaxSpecify upper bound for histogram.-hist_rangeminmaxSpecify a range for the histogram-integer_histogramCreate bins of unit width, centred around integer values. This is useful for integer data such as labels. The histogram range is rounded to the nearest integer, then the min is lowered and the max is raised by 0.5. The number of bins is taken as the difference of these two values. Note that 0.01 is added to the minimum and subtracted from the maximum prior to the rounding in order to ensure that a correctly specified range (e.g. [0.5,255.5]) is preserved. If you want to have integer bins that are wider than one, you will have to work out the histogram range and number of bins yourself and not use this option.-discrete_histogramAttempt to match the histogram to the discretization of the in- put data. This is appropriate for continuous data that are stored in an integer representation and when a bin width close to the discretization is desired. This is similar to-inte-ger_histogram, except that the the histogram range is first con- verted to voxel values which are rounded and extended by half a bin on either side. This new voxel range is then converted back to real values. The number of bins is taken as the difference in the voxel value range. Note that this does not account for vari- ations in slice-to-slice scaling, so odd histogram effects may still occur. This option is intended to give behaviour similar to that ofvolume_stats.-int_max_binsnumber-of-binsSpecify the largest histogram that can be automatically sized with the above options. The limit prevents accidental creation of huge histograms. This option replaced the old-max_binsop- tion in MINC 1.1.Basic statistics-allCompute all statistical measures. This is the default.-noneSynonym for-count(for similarity to volume_stats). Note that although this was necessary forvolume_stats, it is not needed here, since specifying any of these options automatically turns off-all-countCount the number of voxels that are within the range and mask.-percentPrint the percentage of voxels within the range and mask-volumePrint the volume of the voxels within the range and mask (in mm- cubed).-minPrint the minimum value.-maxPrint the maximum value.-sumPrint the sum of all values.-sum2Print the sum of the squares of all values.-meanPrint the mean.-variancePrint the variance.-stddevPrint the standard deviation.-CoMPrint the centre of mass. Both the voxel coordinate and the world coordinates are printed. The voxel coordinates are printed in file order, whilst the world coordinates are printed in x,y,z order.-comSynonym for-CoM.-world_onlyPrint the centre of mass in world coordinates only.Histogram statisticsNote that histogram statistics are derived solely from the histogram counts and bin centres, so results such as the median will not be ex- actly the same as the true value for all included voxels. For example, the error on the median can be as large as a half bin width. Further- more, if the histogram range is less than that of included voxels, then the result applies only to voxels included in the histogram.-hist_countPrint number of voxels in histogram. This may be different from the number of included and masked voxels if the histogram range is less than the range of the included data.-hist_percentPrint percentage of voxels included in histogram.-medianPrint the histogram median.-majorityPrint the bin centre (intensity value) for the bin with the most counts.-biModalTPrint the bi-modal threshold calculated using the method de- scribed in Otsu N, "A Threshold Selection Method from Grey-level Histograms", IEEE Trans on Systems, Man and Cybernetics. 1979, 9:1; 62-66.-pctTPrint the threshold needed for a particular critical percentage of the histogram.-entropyPrint the Shannon entropy. H(x) = - Sum(P(i) * log2(P(i)) where P(i) is the bin probabilityGeneric options for all commands:-helpPrint summary of command-line options and exit.-versionPrint the program's version number and exit.AUTHORAndrew JankeCOPYRIGHTSProgram: Copyright (C) 2000 by Andrew Janke Man page: Copyright (C) 2001 by Peter Neelin $Date: 2004-05-20 21:52:09 $ MINCSTATS(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | General options | Invalid value options | Volume range options | Histogram options | Basic statistics | Histogram statistics | Generic options for all commands: | AUTHOR | COPYRIGHTS

Want to link to this manual page? Use this URL:

<https://www.freebsd.org/cgi/man.cgi?query=mincstats&sektion=1&manpath=FreeBSD+12.1-RELEASE+and+Ports>