SMILX  1.01
Typedefs | Enumerations | Functions
milxImageApp.cxx File Reference

A swiss-army knife of image processing. This application implements single/batch processing of images with various processing options found in the SMILI library.You are able to smooth, mask, threshold etc. a number of images easily via the commandline with this application (use –help). This application uses the milxImage class to do all processing. More...

#include <vector>
#include <tclap/CmdLine.h>
#include <milxFile.h>
#include <milxImage.h>

Go to the source code of this file.

Typedefs

typedef std::vector< std::string >::iterator stringiterator
 
typedef unsigned char charPixelType
 
typedef itk::Image< charPixelType, milx::imgDimension > charImageType
 
typedef float floatPixelType
 
typedef itk::Image< floatPixelType, milx::imgDimension > floatImageType
 
typedef itk::VectorImage< floatPixelType, milx::imgDimension > vectorImageType
 

Enumerations

enum  operations {
  none = 0, convert, duplicate, cat,
  split, scale, decimate, smooth,
  laplacian, thresholdscalars, flip, diffscalars,
  copyscalars, diffscalarspairs, statscalars, removescalars,
  mse, procrustes, icp, clip,
  voxelise, orient, flat, none = 0,
  info, convert, print, csv,
  none = 0, info, convert, labelinfo,
  rescale, invert, relabel, smooth,
  bilateral, median, gradmag, laplacian,
  distancemap, threshold, Otsu, crop,
  mask, resample, match, checker,
  add, diff, mean, merge,
  cast, flip, none = 0, convert,
  duplicate, cat, split, scale,
  decimate, smooth, laplacian, thresholdscalars,
  clip, flip, diffscalars, copyscalars,
  diffscalarspairs, statscalars, removescalars, mse,
  procrustes, icp
}
 

Functions

int main (int argc, char *argv[])
 

Detailed Description

A swiss-army knife of image processing. This application implements single/batch processing of images with various processing options found in the SMILI library.

You are able to smooth, mask, threshold etc. a number of images easily via the commandline with this application (use –help). This application uses the milxImage class to do all processing.

In the following examples, to process all nifti images in MRIs directory (you can just provide a single image filename to do just one):

Otsu multiple threshold:

milxImageApp --Otsu 128 features/median/*.nii.gz --labels 4 -p features/Otsu/Otsu_128bins_

Rescale image intensities:

milxImageApp --rescale MRIs/*.nii.gz --above 255 --below 0 -p features/rescale/rescale_

Labelling info:

milxImageApp --info --labels 0 Labels/*.nii.gz

The unique label values present in each image is output. A concatenated output is provided at the end for analysis (histograms etc.)

Checkerboards Atlas_MRI_Mean2_R_Preprocessed_x2.nii.gz to all Nifti images in current directory and writes to files with prefix check_:

milxImageApp --checkerboard SyngoHipData/Atlas_MRI_Mean2_R_Preprocessed_x2.nii.gz *.nii.gz -p check_

Definition in file milxImageApp.cxx.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Program Info

Process Arguments

Optional

Switches XOR Switches

Mandatory

Add argumnets

XOR args

Parse the argv array.

Get the value parsed by each arg.

Setup ITK Threads

Display operation

Check if output argument given and only doing one image

Open files

Todo:
handle 4D images here properly

Operate

Write result, separate as some members convert to/from labelled images

Definition at line 69 of file milxImageApp.cxx.