Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
Registration.cpp File Reference
#include "mitkCommandLineParser.h"
#include <mitkIOUtil.h>
#include <mitkRegistrationWrapper.h>
#include <mitkImage.h>
#include <mitkImageCast.h>
#include <mitkITKImageImport.h>
#include <mitkImageTimeSelector.h>
#include <itkImageFileWriter.h>
#include <itksys/SystemTools.hxx>
#include <itkDirectory.h>
#include "itkLinearInterpolateImageFunction.h"
#include "itkWindowedSincInterpolateImageFunction.h"
#include "itkIdentityTransform.h"
#include "itkResampleImageFilter.h"
#include "itkNrrdImageIO.h"

Go to the source code of this file.

Typedefs

typedef std::vector< std::string > FileListType
 
typedef itk::Image< double, 3 > InputImageType
 

Functions

static mitk::Image::Pointer ExtractFirstTS (mitk::Image *image, std::string fileType)
 
static std::vector< std::string > & split (const std::string &s, char delim, std::vector< std::string > &elems)
 
static std::vector< std::string > split (const std::string &s, char delim)
 
static FileListType CreateFileList (std::string folder, std::string postfix)
 Create list of all files in provided folder ending with same postfix. More...
 
static std::string GetSavePath (std::string outputFolder, std::string fileName)
 
static mitk::Image::Pointer ResampleBySpacing (mitk::Image *input, float *spacing, bool useLinInt=false)
 
static FileListType CreateDerivedFileList (std::string baseFN, std::string baseSuffix, std::vector< std::string > derivedPatterns)
 Build a derived file name from moving images e.g. xxx_T2.nrrd becomes xxx_GTV.nrrd. More...
 
static void SaveImage (std::string fileName, mitk::Image *image, std::string fileType)
 Save images according to file type. More...
 
static void CopyResources (FileListType fileList, std::string outputPath)
 Copy derived resources from first time step. Append _reg tag, but leave data untouched. More...
 
int main (int argc, char *argv[])
 

Typedef Documentation

typedef std::vector<std::string> FileListType

Definition at line 39 of file Registration.cpp.

typedef itk::Image<double, 3> InputImageType

Definition at line 40 of file Registration.cpp.

Function Documentation

static void CopyResources ( FileListType  fileList,
std::string  outputPath 
)
static

Copy derived resources from first time step. Append _reg tag, but leave data untouched.

Definition at line 217 of file Registration.cpp.

References ExtractFirstTS(), mitk::IOUtil::LoadImage(), MITK_INFO, and mitk::IOUtil::SaveImage().

Referenced by main().

static FileListType CreateDerivedFileList ( std::string  baseFN,
std::string  baseSuffix,
std::vector< std::string >  derivedPatterns 
)
static

Build a derived file name from moving images e.g. xxx_T2.nrrd becomes xxx_GTV.nrrd.

Definition at line 189 of file Registration.cpp.

References MITK_INFO.

Referenced by main().

static FileListType CreateFileList ( std::string  folder,
std::string  postfix 
)
static

Create list of all files in provided folder ending with same postfix.

Definition at line 73 of file Registration.cpp.

References filename, and mitk::New().

Referenced by main().

static mitk::Image::Pointer ExtractFirstTS ( mitk::Image image,
std::string  fileType 
)
static

Definition at line 42 of file Registration.cpp.

References mitk::ImageTimeSelector::New().

Referenced by CopyResources(), and main().

static std::string GetSavePath ( std::string  outputFolder,
std::string  fileName 
)
static

Definition at line 98 of file Registration.cpp.

Referenced by main().

static mitk::Image::Pointer ResampleBySpacing ( mitk::Image input,
float *  spacing,
bool  useLinInt = false 
)
static

1) Resampling

Definition at line 109 of file Registration.cpp.

References mitk::CastToItkImage(), mitk::GrabItkImageMemory(), mitk::New(), and mitk::Image::New().

Referenced by main().

static void SaveImage ( std::string  fileName,
mitk::Image image,
std::string  fileType 
)
static

Save images according to file type.

Definition at line 209 of file Registration.cpp.

References MITK_INFO, and mitk::IOUtil::Save().

static std::vector<std::string>& split ( const std::string &  s,
char  delim,
std::vector< std::string > &  elems 
)
static

Definition at line 55 of file Registration.cpp.

Referenced by main(), and split().

static std::vector<std::string> split ( const std::string &  s,
char  delim 
)
static

Definition at line 66 of file Registration.cpp.

References split().