Medical Imaging Interaction Toolkit  2018.4.99-18ddd2ed
Medical Imaging Interaction Toolkit
PixelDumpMiniApp.cpp File Reference
#include <string>
#include "itksys/SystemTools.hxx"
#include "itkImageRegionConstIteratorWithIndex.h"
#include "itkCastImageFilter.h"
#include "itkExtractImageFilter.h"
#include "mitkCommandLineParser.h"
#include <mitkIOUtil.h>
#include <mitkPreferenceListReaderOptionsFunctor.h>
#include <mitkImageTimeSelector.h>
#include "mitkImageAccessByItk.h"
#include "mitkImageCast.h"

Go to the source code of this file.

Typedefs

using ImageVectorType = std::vector< mitk::Image::Pointer >
 
typedef itk::Image< mitk::ScalarType, 3 > InternalImageType
 
typedef std::map< std::string, InternalImageType::Pointer > InternalImageMapType
 
typedef itk::Index< 3 > DumpIndexType
 
typedef std::vector< mitk::ScalarTypeDumpedValuesType
 
typedef std::map< DumpIndexType, DumpedValuesType, DumpIndexCompare > DumpPixelMapType
 

Functions

bool verbose (false)
 
void setupParser (mitkCommandLineParser &parser)
 
bool configureApplicationSettings (std::map< std::string, us::Any > parsedArgs)
 
template<typename TPixel , unsigned int VImageDimension>
void ExtractRelevantInformation (const itk::Image< TPixel, VImageDimension > *image)
 
template<typename TPixel , unsigned int VImageDimension>
void DoInternalImageConversion (const itk::Image< TPixel, VImageDimension > *image, InternalImageType::Pointer &internalImage)
 
template<typename TPixel , unsigned int VImageDimension>
void DoMaskedCollecting (const itk::Image< TPixel, VImageDimension > *image)
 
InternalImageMapType ConvertImageTimeSteps (mitk::Image *image)
 
void doDumping ()
 
void storeCSV ()
 
int main (int argc, char *argv[])
 

Variables

mitkCommandLineParser::StringContainerType inFilenames
 
std::string outFileName
 
std::string maskFileName
 
mitkCommandLineParser::StringContainerType captions
 
ImageVectorType images
 
mitk::Image::Pointer mask
 
InternalImageMapType internalImages
 
itk::ImageRegion< 3 > relevantRegion
 
InternalImageType::PointType relevantOrigin
 
InternalImageType::SpacingType relevantSpacing
 
InternalImageType::DirectionType relevantDirection
 
DumpPixelMapType dumpedPixels
 

Typedef Documentation

◆ DumpedValuesType

typedef std::vector<mitk::ScalarType> DumpedValuesType

Definition at line 55 of file PixelDumpMiniApp.cpp.

◆ DumpIndexType

Definition at line 54 of file PixelDumpMiniApp.cpp.

◆ DumpPixelMapType

typedef std::map<DumpIndexType, DumpedValuesType, DumpIndexCompare> DumpPixelMapType

Definition at line 83 of file PixelDumpMiniApp.cpp.

◆ ImageVectorType

using ImageVectorType = std::vector<mitk::Image::Pointer>

Definition at line 38 of file PixelDumpMiniApp.cpp.

◆ InternalImageMapType

typedef std::map<std::string, InternalImageType::Pointer> InternalImageMapType

Definition at line 46 of file PixelDumpMiniApp.cpp.

◆ InternalImageType

Definition at line 45 of file PixelDumpMiniApp.cpp.

Function Documentation

◆ configureApplicationSettings()

bool configureApplicationSettings ( std::map< std::string, us::Any parsedArgs)

Definition at line 122 of file PixelDumpMiniApp.cpp.

References us::any_cast(), captions, inFilenames, maskFileName, and outFileName.

Referenced by main().

◆ ConvertImageTimeSteps()

◆ doDumping()

◆ DoInternalImageConversion()

template<typename TPixel , unsigned int VImageDimension>
void DoInternalImageConversion ( const itk::Image< TPixel, VImageDimension > *  image,
InternalImageType::Pointer &  internalImage 
)

◆ DoMaskedCollecting()

template<typename TPixel , unsigned int VImageDimension>
void DoMaskedCollecting ( const itk::Image< TPixel, VImageDimension > *  image)

Definition at line 223 of file PixelDumpMiniApp.cpp.

References dumpedPixels, internalImages, and relevantRegion.

Referenced by doDumping().

◆ ExtractRelevantInformation()

template<typename TPixel , unsigned int VImageDimension>
void ExtractRelevantInformation ( const itk::Image< TPixel, VImageDimension > *  image)

Definition at line 148 of file PixelDumpMiniApp.cpp.

References relevantDirection, relevantOrigin, relevantRegion, and relevantSpacing.

Referenced by doDumping().

◆ main()

◆ setupParser()

◆ storeCSV()

void storeCSV ( )

Definition at line 352 of file PixelDumpMiniApp.cpp.

References dumpedPixels, internalImages, and outFileName.

Referenced by main().

◆ verbose()

bool verbose ( false  )

Variable Documentation

◆ captions

◆ dumpedPixels

DumpPixelMapType dumpedPixels

Definition at line 84 of file PixelDumpMiniApp.cpp.

Referenced by DoMaskedCollecting(), and storeCSV().

◆ images

Definition at line 39 of file PixelDumpMiniApp.cpp.

Referenced by doDumping(), and main().

◆ inFilenames

◆ internalImages

InternalImageMapType internalImages

Definition at line 47 of file PixelDumpMiniApp.cpp.

Referenced by doDumping(), DoMaskedCollecting(), and storeCSV().

◆ mask

Definition at line 41 of file PixelDumpMiniApp.cpp.

◆ maskFileName

std::string maskFileName

Definition at line 35 of file PixelDumpMiniApp.cpp.

Referenced by configureApplicationSettings(), and main().

◆ outFileName

std::string outFileName

Definition at line 34 of file PixelDumpMiniApp.cpp.

Referenced by configureApplicationSettings(), and storeCSV().

◆ relevantDirection

InternalImageType::DirectionType relevantDirection

Definition at line 52 of file PixelDumpMiniApp.cpp.

Referenced by DoInternalImageConversion(), and ExtractRelevantInformation().

◆ relevantOrigin

InternalImageType::PointType relevantOrigin

Definition at line 50 of file PixelDumpMiniApp.cpp.

Referenced by DoInternalImageConversion(), and ExtractRelevantInformation().

◆ relevantRegion

itk::ImageRegion<3> relevantRegion

◆ relevantSpacing

InternalImageType::SpacingType relevantSpacing

Definition at line 51 of file PixelDumpMiniApp.cpp.

Referenced by DoInternalImageConversion(), and ExtractRelevantInformation().