odin-1.8.8/ 0000755 0001750 0001750 00000000000 12415160675 007471 5 0000000 0000000 odin-1.8.8/cmdline-utils/ 0000755 0001750 0001750 00000000000 12415160675 012242 5 0000000 0000000 odin-1.8.8/cmdline-utils/micalc.1 0000644 0001750 0001750 00000023526 12370623124 013475 0000000 0000000 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH MICALC "1" "August 2014" "micalc 1.8.8" "User Commands"
.SH NAME
micalc \- Performs basic mathematics with data sets
.SH DESCRIPTION
micalc: Performs basic mathematics with data sets
.IP
File formats are automatically identified by their file extension.
For binary operations with two input files, the protocol of the first input file will be used for the output file.
.SS "micalc can be used in one of the following modes:"
.IP
Binary operation with data sets and/or scalar numbers:
.IP
micalc [\-if1 | \fB\-in1\fR ] \fB\-op\fR [\-if2 | \fB\-in2\fR ] \fB\-of\fR
.IP
Accumulation of one data set:
.IP
micalc \fB\-if\fR \fB\-op\fR
.IP
Transformation (magnitude, logarithm, negation, inversion, or acos) of one data set:
.IP
micalc \fB\-if\fR \fB\-op\fR \fB\-of\fR
.IP
Statistics of one data set:
.IP
micalc \fB\-if\fR [\-mean ] [\-stdev ] [\-fluct ] [\-tcourse ][\-hist \fB\-histslots\fR [\-histmin ] [\-histmax ] [\-rightstairs] [\-histfract] [\-loghist] ]
.SS "Extra options:"
.HP
\fB\-mask\fR
.SS "File read options:"
.HP
\fB\-date\fR: Date of scan [yyyymmdd] (default=20140807yyyymmdd)
.HP
\fB\-fp\fR: FOV in phase direction [mm] (default=220.0mm)
.HP
\fB\-fr\fR: FOV in read direction [mm] (default=220.0mm)
.HP
\fB\-fs\fR: FOV in slice direction [mm] (default=5.0mm)
.HP
\fB\-nr\fR: Number of consecutive measurements (default=1)
.HP
\fB\-nx\fR: Number of points in read direction (default=128)
.HP
\fB\-ny\fR: Number of points in phase direction (default=128)
.HP
\fB\-nz\fR: Number of points in slice direction (default=1)
.HP
\fB\-pbirth\fR: Patients date of birth [yyyymmdd] (default=00000000yyyymmdd)
.HP
\fB\-pid\fR: Unique patient identifier (default=Unknown)
.HP
\fB\-pname\fR: Full patient name (default=Unknown)
.HP
\fB\-psex\fR: Patients sex (options=M F O , default=O)
.HP
\fB\-pweight\fR: Patients weight [kg] (default=50.0kg)
.HP
\fB\-scient\fR: Scientist Name (default=Unknown)
.HP
\fB\-sd\fR: Inter\-slice distance (from center to center) [mm] (default=10.0mm)
.HP
\fB\-serd\fR: Series Description (default=Unknown)
.HP
\fB\-serno\fR: Series Number (default=1)
.HP
\fB\-st\fR: Slice thickness [mm] (default=5.0mm)
.HP
\fB\-stud\fR: Study Description (default=Unknown)
.HP
\fB\-tcname\fR: Name of transmit coil (default=Unknown)
.HP
\fB\-te\fR: Time\-to\-echo of the sequence [ms] (default=80.0ms)
.HP
\fB\-time\fR: Time of scan [hhmmss] (default=091012hhmmss)
.HP
\fB\-tr\fR: Time between consecutive excitations [ms] (default=1000.0ms)
.HP
\fB\-cplx\fR: Treat data as complex and extract the given component (options=none abs pha real imag , default=none)
.HP
\fB\-ds\fR: Dataset index to extract if multiple datasets are read
.HP
\fB\-filter\fR: Read only those datasets which protocol parameter 'key' contains the string 'value' (given in the format 'key=value')
.HP
\fB\-fmap\fR: For reduced memory usage, keep filemapping after reading (raw) data, but writing into the array will result in a crash
.HP
\fB\-jdx\fR: If multiple JDX arrays are present, select this
.HP
\fB\-rdialect\fR: Read data using given dialect of the format. (default is no dialect)
.HP
\fB\-rf\fR: Read format, use it to override file extension (options=autodetect 3db analyze asc coi dat dcm double float gz hdr idx ima interfile jdx mag mhd nii ph png pos pro reg s16bit s32bit s8bit smp u16bit u32bit u8bit , default=autodetect)
.HP
\fB\-skip\fR: Skip this amount of bytes before reading the raw data (default=0)
.SS "File write options:"
.HP
\fB\-append\fR: Append to existing file, only for raw data
.HP
\fB\-fnamepar\fR: Space\-separated list of protocol parameters to include when creating unique file names
.HP
\fB\-noscale\fR: Do not rescale values when storing integers
.HP
\fB\-split\fR: Force splitting of protocol\-data pairs into separate files.
.HP
\fB\-type\fR: Image representation type (options=automatic float double s32bit u32bit s16bit u16bit s8bit u8bit , default=automatic)
.HP
\fB\-wdialect\fR: Write data using given dialect of the format. (default is no dialect)
.HP
\fB\-wf\fR: Write format, use it to override file extension (options=autodetect 3db analyze asc coi dat dcm double float gz hdr idx ima interfile jdx mag mhd nii ph png pos pro reg s16bit s32bit s8bit smp u16bit u32bit u8bit , default=autodetect)
.HP
\fB\-wp\fR: Store the protocol separately to this file.
.SS "Filters applied to input file(s) and mask:"
.HP
\fB\-align\fR : Align data to the geometry (voxel locations) of an external file
.HP
\fB\-automask\fR : Create mask using automatic histogram\-based threshold
.HP
\fB\-cluster\fR : Create clusters of non\-zero adjacent/next\-neighbours voxels, sorted by size
.HP
\fB\-convolve\fR : Convolution in spatial dimensions
.HP
\fB\-detrend\fR : Remove slow drift over time
.HP
\fB\-edit\fR : Edit single voxel values
.HP
\fB\-genmask\fR : Create mask including all voxels with value in given range
.HP
\fB\-isotrop\fR : make image voxels isotrop through interpolation (image geometry will not change)
.HP
\fB\-lowpass\fR : Lowpass filtering
.HP
\fB\-max\fR : Clip all values above maximum value
.HP
\fB\-maxip\fR : Perform maximum intensity projection over given direction
.HP
\fB\-merge\fR : Merge datasets into a single dataset by expanding the time dimension
.HP
\fB\-min\fR : Clip all values below mininum value
.HP
\fB\-minip\fR : Perform minimum intensity projection over given direction
.HP
\fB\-noNaN\fR : Replaces every NaN by the given value
.HP
\fB\-pflip\fR : Flip data in phase direction
.HP
\fB\-prange\fR : Select range in phase direction
.HP
\fB\-proj\fR : Perform mean projection over given direction
.HP
\fB\-quantilmask\fR : Create mask including all voxels above the given fractional threshold
.HP
\fB\-resample\fR : Temporal resize of image data
.HP
\fB\-resize\fR : Spatial resize of image data
.HP
\fB\-reslice\fR : reslices the image to a given orientation
.HP
\fB\-rflip\fR : Flip data in read direction
.HP
\fB\-rot\fR : In\-plane rotation
.HP
\fB\-rrange\fR : Select range in read direction
.HP
\fB\-scale\fR : Rescale image values
.HP
\fB\-sflip\fR : Flip data in slice direction
.HP
\fB\-shift\fR : Shift data spatially
.HP
\fB\-slicetime\fR : Correct for different acquisition time points of slices
.HP
\fB\-splice\fR : splices the image in the given direction
.HP
\fB\-srange\fR : Select range in slice direction
.HP
\fB\-swapdim\fR <[rps][\-],[rps][\-],[rps][\-]> : swap/reflect dimensions by specifying a direction triple with optional reflection sign appended
.HP
\fB\-tile\fR : Combine slices into a square 2D image
.HP
\fB\-trange\fR : Select range in time direction
.HP
\fB\-tshift\fR : Shift data in time
.HP
\fB\-typemax\fR : Clip all values above maximum of a specific datatype
.HP
\fB\-typemin\fR : Clip all values below mininum of a specific datatype
.HP
\fB\-usemask\fR : Create 1D dataset including all values within mask from file
.SS "Other options:"
.HP
\fB\-v\fR or for debugging/tracing all components or a single component, respectively. Possible values for loglevel are: 0(noLog), 1(errorLog), 2(warningLog), 3(infoLog).
.HP
\fB\-h\fR, \fB\-\-help\fR, \fB\-help\fR, \fB\-\-version\fR : Print help text or version information
.SS "Supported file extensions(formats):"
.TP
3db
(Iris3D binary data)
.TP
analyze
(NIFTI/ANALYZE, dialects: fsl )
.TP
asc
(ASCII, dialects: tcourse )
.TP
coi
(JCAMP\-DX data sets)
.TP
dat
(Matlab ascii 2D data matrix)
.TP
dcm
(DICOM, dialects: siemens )
.TP
double
(double raw data)
.TP
float
(float raw data)
.TP
gz
(GNU\-Zip container for other formats)
.TP
hdr
(Interfile, dialects: neurostat )
.TP
hdr
(NIFTI/ANALYZE, dialects: fsl )
.TP
idx
(3D\-indices of non\-zeroes in ASCII)
.TP
ima
(DICOM, dialects: siemens )
.TP
interfile
(Interfile, dialects: neurostat )
.TP
jdx
(JCAMP\-DX image format)
.TP
mag
(DICOM, dialects: siemens )
.TP
mhd
(MetaImage)
.TP
nii
(NIFTI/ANALYZE, dialects: fsl )
.TP
ph
(DICOM, dialects: siemens )
.TP
png
(Portable Network Graphics)
.TP
pos
(x\-y positions of non\-zeroes in ASCII)
.TP
pro
(ODIN measurement protocols)
.TP
reg
(Ansoft HFSS ASCII)
.TP
s16bit
(signed 16 bit raw data)
.TP
s32bit
(signed 32 bit raw data)
.TP
s8bit
(signed 8 bit raw data)
.TP
smp
(JCAMP\-DX data sets)
.TP
u16bit
(unsigned 16 bit raw data)
.TP
u32bit
(unsigned 32 bit raw data)
.TP
u8bit
(unsigned 8 bit raw data)
odin-1.8.8/cmdline-utils/miconv.cpp 0000644 0001750 0001750 00000014736 12370622116 014165 0000000 0000000 #include
#include
#include
/**
* \page miconv Conversion utility for medical images
* \verbinclude cmdline-utils/miconv.usage
*
* \section miconv_examples Some examples how to use miconv:
*
* Read a bunch of DICOM files (format 'dcm'), produced by Siemens, from directory 'mosaic' and convert it to NIFTI file 'mosaic.nii'
* with a dialect suitable for FSL:
* \verbatim
miconv -rf dcm -rdialect siemens -wdialect fsl mosaic mosaic.nii
\endverbatim
*
* Converting a short (16 bit) raw data file '2dseq' of size 256x256 to a DICOM file 'image.dcm':
* \verbatim
miconv -nx 256 -ny 256 -rf short 2dseq image.dcm
\endverbatim
*/
struct MiConvOpts : JcampDxBlock {
JDXstring protfile;
JDXstring parlist;
MiConvOpts() {
protfile.set_cmdline_option("p").set_description("Load this protcol for defaults");
append_member(protfile,"protfile");
parlist.set_cmdline_option("l").set_description("Lists space-separated set of protocol parameters and exits. Use '-l help' to get a list of possible parameters and '-l all' to list all parameters. The parameter 'output-file' must be omitted when using this option.");
append_member(parlist,"parlist");
}
};
////////////////////////////////////////
void usage(const Protocol& prot) {
FileReadOpts ropts;
FileWriteOpts wopts;
MiConvOpts mopts;
FilterChain filter;
STD_cout << "miconv: Converts medical image data between formats." << STD_endl;
STD_cout << " File formats are automatically identified by their file extension." << STD_endl;
STD_cout << " It expects at least two filenames/directories (for the input and output file) at the end of the command line." << STD_endl;
STD_cout << " An exception is the option '-l' which requires only one filename/directory to list its content." << STD_endl;
STD_cout << "Usage: miconv [options] []" << STD_endl;
STD_cout << "General options:" << STD_endl;
STD_cout << mopts.get_cmdline_usage("\t");
STD_cout << "Protocol options:" << STD_endl;
STD_cout << prot.get_cmdline_usage("\t");
STD_cout << "File read options:" << STD_endl;
STD_cout << ropts.get_cmdline_usage("\t");
STD_cout << "File write options:" << STD_endl;
STD_cout << wopts.get_cmdline_usage("\t");
STD_cout << "Filters:" << STD_endl;
STD_cout << filter.get_cmdline_usage("\t");
STD_cout << "Other options:" << STD_endl;
STD_cout << "\t" << LogBase::get_usage() << STD_endl;
STD_cout << "\t" << helpUsage() << STD_endl;
STD_cout << "Supported file extensions(formats):" << STD_endl;
STD_cout << FileIO::autoformats_str("\t") << STD_endl;
}
////////////////////////////////////////
int main(int argc, char* argv[]) {
if(LogBase::set_log_levels(argc,argv)) return 0;
Log odinlog("miconv","main");
char optval[ODIN_MAXCHAR];
Protocol prot_template;
FileReadOpts ropts;
FileWriteOpts wopts;
MiConvOpts mopts;
if(hasHelpOption(argc,argv)) {usage(prot_template); return 0;}
if(argc<3) {usage(prot_template); return 0;}
// set defaults
prot_template.seqpars.set_MatrixSize(readDirection,1);
prot_template.seqpars.set_MatrixSize(phaseDirection,1);
prot_template.seqpars.set_MatrixSize(sliceDirection,1);
mopts.parse_cmdline_options(argc,argv);
STD_string infile;
STD_string outfile;
if(mopts.parlist!="") {
infile=argv[argc-1];
} else {
infile=argv[argc-2];
outfile=argv[argc-1];
}
if(mopts.parlist=="help") {
STD_cout << "Possible protocol parameters:" << STD_endl;
for(unsigned int i=0; i1) {
ncols++;
}
int nrows=ndsets;
if(npars>1) nrows++;
sarray table(ncols,nrows);
if(npars>1) {
for(int ipar=0; iparfirst.printval(pars[ipar]), "\n", ""); // truncate after first newline
}
if(ndsets>1) {
STD_ostringstream oss;
oss << pdit->second.shape();
table(npars,irow)=oss.str();
}
irow++;
}
STD_cout << print_table(table);
return 0;
}
ODINLOG(odinlog,normalDebug) << "mem(in ): " << Profiler::get_memory_usage() << STD_endl;
// Create copy of protocol-data map, thereby modify protocol
FileIO::ProtocolDataMap pdmap_out;
for(FileIO::ProtocolDataMap::const_iterator pdit=pdmap_in.begin(); pdit!=pdmap_in.end(); ++pdit) {
Protocol prot(pdit->first);
prot.parse_cmdline_options(argc,argv); // override parameters of infile
pdmap_out[prot].reference(pdit->second);
}
ODINLOG(odinlog,normalDebug) << "mem(out): " << Profiler::get_memory_usage() << STD_endl;
// Parse before filters to remove options
wopts.parse_cmdline_options(argc,argv);
FilterChain filterchain(argc,argv);
//apply filters on pdmap_out
if(!filterchain.apply(pdmap_out)) return -1;
// Write data
int result=FileIO::autowrite(pdmap_out, outfile, wopts);
if(result>0) result=0;
return result;
}
odin-1.8.8/cmdline-utils/genmakefile.cpp 0000644 0001750 0001750 00000001540 12370622116 015126 0000000 0000000 #include
/**
* \page genmakefile Generate a Makefile for ODIN sequences
* \verbinclude cmdline-utils/genmakefile.usage
*/
void usage() {
STD_cout << "genmakefile: Generates a Makefile for ODIN methods" << STD_endl;
STD_cout << "Usage: genmakefile [options] " << STD_endl;
STD_cout << "Options:" << STD_endl;
STD_cout << "\t" << LogBase::get_usage() << STD_endl;
STD_cout << "\t" << helpUsage() << STD_endl;
}
int main(int argc, char* argv[]) {
LogBase::set_log_levels(argc,argv);
if(hasHelpOption(argc,argv)) {usage(); return 0;}
char buff[ODIN_MAXCHAR];
if(argc<=1) {usage(); exit(0);}
STD_string methlabel;
if(getLastArgument(argc,argv,buff,ODIN_MAXCHAR)) {
methlabel=buff;
}
SeqMakefile mf(methlabel,INSTALL_PREFIX);
STD_cout << mf.get_Makefile(".") << STD_endl;
return 0;
}
odin-1.8.8/cmdline-utils/gencoil.1 0000644 0001750 0001750 00000002657 12370623123 013666 0000000 0000000 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH GENCOIL "1" "August 2014" "gencoil 1.8.8" "User Commands"
.SH NAME
gencoil \- Generates a virtual coil suitable for sequence simulation in ODIN
.SH DESCRIPTION
gencoil: Generates a virtual coil suitable for sequence simulation in ODIN
.SS "Usage and options:"
.IP
Generate a radially inhomogenous coil:
.IP
gencoil \fB\-rad\fR \fB\-n\fR \fB\-fov\fR \fB\-R\fR \fB\-o\fR
.IP
Generate an array coil by rotating pre\-existing image file:
.IP
gencoil \fB\-rot\fR \fB\-n\fR \fB\-fov\fR \fB\-nc\fR \fB\-i\fR \fB\-sl\fR \fB\-o\fR
.IP
Generate an array coil consisting of simple loops:
.TP
gencoil \fB\-arr\fR \fB\-n\fR \fB\-nc\fR
\fB\-fov\fR \fB\-R\fR \fB\-o\fR
.IP
Generate coil with a B1 gradient:
.IP
gencoil \fB\-grad\fR \fB\-n\fR \fB\-fov\fR \fB\-g\fR \fB\-o\fR
.SS "Other options:"
.HP
\fB\-v\fR or for debugging/tracing all components or a single component, respectively. Possible values for loglevel are: 0(noLog), 1(errorLog), 2(warningLog), 3(infoLog).
.HP
\fB\-h\fR, \fB\-\-help\fR, \fB\-help\fR, \fB\-\-version\fR : Print help text or version information
odin-1.8.8/cmdline-utils/miconv.1 0000644 0001750 0001750 00000022431 12370623121 013527 0000000 0000000 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH MICONV "1" "August 2014" "miconv 1.8.8" "User Commands"
.SH NAME
miconv \- Converts medical image data between formats.
.SH SYNOPSIS
.B miconv
[\fIoptions\fR] \fI \fR[\fI\fR]
.SH DESCRIPTION
miconv: Converts medical image data between formats.
.IP
File formats are automatically identified by their file extension.
It expects at least two filenames/directories (for the input and output file) at the end of the command line.
An exception is the option '\-l' which requires only one filename/directory to list its content.
.SS "General options:"
.HP
\fB\-l\fR: Lists space\-separated set of protocol parameters and exits. Use '\-l help' to get a list of possible parameters and '\-l all' to list all parameters. The parameter 'output\-file' must be omitted when using this option.
.HP
\fB\-p\fR: Load this protcol for defaults
.SS "Protocol options:"
.HP
\fB\-date\fR: Date of scan [yyyymmdd] (default=20140807yyyymmdd)
.HP
\fB\-fp\fR: FOV in phase direction [mm] (default=220.0mm)
.HP
\fB\-fr\fR: FOV in read direction [mm] (default=220.0mm)
.HP
\fB\-fs\fR: FOV in slice direction [mm] (default=5.0mm)
.HP
\fB\-nr\fR: Number of consecutive measurements (default=1)
.HP
\fB\-nx\fR: Number of points in read direction (default=128)
.HP
\fB\-ny\fR: Number of points in phase direction (default=128)
.HP
\fB\-nz\fR: Number of points in slice direction (default=1)
.HP
\fB\-pbirth\fR: Patients date of birth [yyyymmdd] (default=00000000yyyymmdd)
.HP
\fB\-pid\fR: Unique patient identifier (default=Unknown)
.HP
\fB\-pname\fR: Full patient name (default=Unknown)
.HP
\fB\-psex\fR: Patients sex (options=M F O , default=O)
.HP
\fB\-pweight\fR: Patients weight [kg] (default=50.0kg)
.HP
\fB\-scient\fR: Scientist Name (default=Unknown)
.HP
\fB\-sd\fR: Inter\-slice distance (from center to center) [mm] (default=10.0mm)
.HP
\fB\-serd\fR: Series Description (default=Unknown)
.HP
\fB\-serno\fR: Series Number (default=1)
.HP
\fB\-st\fR: Slice thickness [mm] (default=5.0mm)
.HP
\fB\-stud\fR: Study Description (default=Unknown)
.HP
\fB\-tcname\fR: Name of transmit coil (default=Unknown)
.HP
\fB\-te\fR: Time\-to\-echo of the sequence [ms] (default=80.0ms)
.HP
\fB\-time\fR: Time of scan [hhmmss] (default=091009hhmmss)
.HP
\fB\-tr\fR: Time between consecutive excitations [ms] (default=1000.0ms)
.SS "File read options:"
.HP
\fB\-cplx\fR: Treat data as complex and extract the given component (options=none abs pha real imag , default=none)
.HP
\fB\-ds\fR: Dataset index to extract if multiple datasets are read
.HP
\fB\-filter\fR: Read only those datasets which protocol parameter 'key' contains the string 'value' (given in the format 'key=value')
.HP
\fB\-fmap\fR: For reduced memory usage, keep filemapping after reading (raw) data, but writing into the array will result in a crash
.HP
\fB\-jdx\fR: If multiple JDX arrays are present, select this
.HP
\fB\-rdialect\fR: Read data using given dialect of the format. (default is no dialect)
.HP
\fB\-rf\fR: Read format, use it to override file extension (options=autodetect 3db analyze asc coi dat dcm double float gz hdr idx ima interfile jdx mag mhd nii ph png pos pro reg s16bit s32bit s8bit smp u16bit u32bit u8bit , default=autodetect)
.HP
\fB\-skip\fR: Skip this amount of bytes before reading the raw data (default=0)
.SS "File write options:"
.HP
\fB\-append\fR: Append to existing file, only for raw data
.HP
\fB\-fnamepar\fR: Space\-separated list of protocol parameters to include when creating unique file names
.HP
\fB\-noscale\fR: Do not rescale values when storing integers
.HP
\fB\-split\fR: Force splitting of protocol\-data pairs into separate files.
.HP
\fB\-type\fR: Image representation type (options=automatic float double s32bit u32bit s16bit u16bit s8bit u8bit , default=automatic)
.HP
\fB\-wdialect\fR: Write data using given dialect of the format. (default is no dialect)
.HP
\fB\-wf\fR: Write format, use it to override file extension (options=autodetect 3db analyze asc coi dat dcm double float gz hdr idx ima interfile jdx mag mhd nii ph png pos pro reg s16bit s32bit s8bit smp u16bit u32bit u8bit , default=autodetect)
.HP
\fB\-wp\fR: Store the protocol separately to this file.
.SS "Filters:"
.HP
\fB\-align\fR : Align data to the geometry (voxel locations) of an external file
.HP
\fB\-automask\fR : Create mask using automatic histogram\-based threshold
.HP
\fB\-cluster\fR : Create clusters of non\-zero adjacent/next\-neighbours voxels, sorted by size
.HP
\fB\-convolve\fR : Convolution in spatial dimensions
.HP
\fB\-detrend\fR : Remove slow drift over time
.HP
\fB\-edit\fR : Edit single voxel values
.HP
\fB\-genmask\fR : Create mask including all voxels with value in given range
.HP
\fB\-isotrop\fR : make image voxels isotrop through interpolation (image geometry will not change)
.HP
\fB\-lowpass\fR : Lowpass filtering
.HP
\fB\-max\fR : Clip all values above maximum value
.HP
\fB\-maxip\fR : Perform maximum intensity projection over given direction
.HP
\fB\-merge\fR : Merge datasets into a single dataset by expanding the time dimension
.HP
\fB\-min\fR : Clip all values below mininum value
.HP
\fB\-minip\fR : Perform minimum intensity projection over given direction
.HP
\fB\-noNaN\fR : Replaces every NaN by the given value
.HP
\fB\-pflip\fR : Flip data in phase direction
.HP
\fB\-prange\fR : Select range in phase direction
.HP
\fB\-proj\fR : Perform mean projection over given direction
.HP
\fB\-quantilmask\fR : Create mask including all voxels above the given fractional threshold
.HP
\fB\-resample\fR : Temporal resize of image data
.HP
\fB\-resize\fR : Spatial resize of image data
.HP
\fB\-reslice\fR : reslices the image to a given orientation
.HP
\fB\-rflip\fR : Flip data in read direction
.HP
\fB\-rot\fR : In\-plane rotation
.HP
\fB\-rrange\fR : Select range in read direction
.HP
\fB\-scale\fR : Rescale image values
.HP
\fB\-sflip\fR : Flip data in slice direction
.HP
\fB\-shift\fR : Shift data spatially
.HP
\fB\-slicetime\fR : Correct for different acquisition time points of slices
.HP
\fB\-splice\fR : splices the image in the given direction
.HP
\fB\-srange\fR : Select range in slice direction
.HP
\fB\-swapdim\fR <[rps][\-],[rps][\-],[rps][\-]> : swap/reflect dimensions by specifying a direction triple with optional reflection sign appended
.HP
\fB\-tile\fR : Combine slices into a square 2D image
.HP
\fB\-trange\fR : Select range in time direction
.HP
\fB\-tshift\fR : Shift data in time
.HP
\fB\-typemax\fR : Clip all values above maximum of a specific datatype
.HP
\fB\-typemin\fR : Clip all values below mininum of a specific datatype
.HP
\fB\-usemask\fR : Create 1D dataset including all values within mask from file
.SS "Other options:"
.HP
\fB\-v\fR or for debugging/tracing all components or a single component, respectively. Possible values for loglevel are: 0(noLog), 1(errorLog), 2(warningLog), 3(infoLog).
.HP
\fB\-h\fR, \fB\-\-help\fR, \fB\-help\fR, \fB\-\-version\fR : Print help text or version information
.SS "Supported file extensions(formats):"
.TP
3db
(Iris3D binary data)
.TP
analyze
(NIFTI/ANALYZE, dialects: fsl )
.TP
asc
(ASCII, dialects: tcourse )
.TP
coi
(JCAMP\-DX data sets)
.TP
dat
(Matlab ascii 2D data matrix)
.TP
dcm
(DICOM, dialects: siemens )
.TP
double
(double raw data)
.TP
float
(float raw data)
.TP
gz
(GNU\-Zip container for other formats)
.TP
hdr
(Interfile, dialects: neurostat )
.TP
hdr
(NIFTI/ANALYZE, dialects: fsl )
.TP
idx
(3D\-indices of non\-zeroes in ASCII)
.TP
ima
(DICOM, dialects: siemens )
.TP
interfile
(Interfile, dialects: neurostat )
.TP
jdx
(JCAMP\-DX image format)
.TP
mag
(DICOM, dialects: siemens )
.TP
mhd
(MetaImage)
.TP
nii
(NIFTI/ANALYZE, dialects: fsl )
.TP
ph
(DICOM, dialects: siemens )
.TP
png
(Portable Network Graphics)
.TP
pos
(x\-y positions of non\-zeroes in ASCII)
.TP
pro
(ODIN measurement protocols)
.TP
reg
(Ansoft HFSS ASCII)
.TP
s16bit
(signed 16 bit raw data)
.TP
s32bit
(signed 32 bit raw data)
.TP
s8bit
(signed 8 bit raw data)
.TP
smp
(JCAMP\-DX data sets)
.TP
u16bit
(unsigned 16 bit raw data)
.TP
u32bit
(unsigned 32 bit raw data)
.TP
u8bit
(unsigned 8 bit raw data)
odin-1.8.8/cmdline-utils/genmakefile.1 0000644 0001750 0001750 00000001217 12370623117 014507 0000000 0000000 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.10.
.TH GENMAKEFILE "1" "August 2014" "genmakefile 1.8.8" "User Commands"
.SH NAME
genmakefile \- Generates a Makefile for ODIN methods
.SH SYNOPSIS
.B genmakefile
[\fIoptions\fR] \fI\fR
.SH DESCRIPTION
genmakefile: Generates a Makefile for ODIN methods
.SH OPTIONS
.HP
\fB\-v\fR or for debugging/tracing all components or a single component, respectively. Possible values for loglevel are: 0(noLog), 1(errorLog), 2(warningLog), 3(infoLog).
.HP
\fB\-h\fR, \fB\-\-help\fR, \fB\-help\fR, \fB\-\-version\fR : Print help text or version information
odin-1.8.8/cmdline-utils/swab.cpp 0000644 0001750 0001750 00000006173 12370622116 013622 0000000 0000000 #include
#include
#include
/**
* \page swab Swap adjacent bytes
* \verbinclude cmdline-utils/swab.usage
*/
int main(int argc, char* argv[]) {
if(argc < 4 || argc > 5) {
std::cout << "swab: Mirrors bytes, in the case of 2, it swaps adjacent bytes" << std::endl;
std::cout << "Usage: swab []" << std::endl;
return 0;
}
char *temp1,*temp2;
unsigned long n_bytes;
unsigned long block_size,i,k,n_data,j;
std::ofstream out_data;
n_bytes = atoi(argv[1]);
if(n_bytes<=0) {
std::cerr << "swab: ERROR: invalid n_bytes=" << n_bytes << std::endl;
return -1;
}
std::ifstream in_data(argv[2],std::ios::in|std::ios::binary);
if(in_data == NULL) {
std::cerr << "swab: ERROR: can't open file " << argv[2] << std::endl;
return -1;
}
in_data.seekg(0,std::ios::end);
if(argc == 5) block_size = (unsigned)atol(argv[4])*1000000;
else block_size = in_data.tellg();
block_size-= block_size%n_bytes;
n_data=in_data.tellg();
if(block_size > n_data) {
// std::cerr << "swab: block size exceeding file size !" << std::endl
// << "setting block size to file size (=" << n_data/1000000. << "MB)" << std::endl;
block_size = n_data;
}
in_data.seekg(0,std::ios::beg);
if((float)n_data/(float)n_bytes-n_data/n_bytes) {
std::cerr << "swab: ERROR: swab: size of \n" << argv[2] <<
"not a multiple of no. of swap bytes (" << n_bytes << ")" << std::endl;
return -1;
}
temp1=new char[block_size];
temp2=new char[block_size];
for(k=0;k