Medical Imaging Interaction Toolkit  2018.4.99-6aa36ba9
Medical Imaging Interaction Toolkit
CLGlobalImageFeatures.cpp File Reference
#include "time.h"
#include <sstream>
#include <fstream>
#include <mitkIOUtil.h>
#include "mitkCommandLineParser.h"
#include <mitkSplitParameterToVector.h>
#include <mitkGlobalImageFeaturesParameter.h>
#include <mitkGIFCooccurenceMatrix.h>
#include <mitkGIFCooccurenceMatrix2.h>
#include <mitkGIFGreyLevelRunLength.h>
#include <mitkGIFFirstOrderStatistics.h>
#include <mitkGIFFirstOrderHistogramStatistics.h>
#include <mitkGIFFirstOrderNumericStatistics.h>
#include <mitkGIFVolumetricStatistics.h>
#include <mitkGIFVolumetricDensityStatistics.h>
#include <mitkGIFGreyLevelSizeZone.h>
#include <mitkGIFGreyLevelDistanceZone.h>
#include <mitkGIFImageDescriptionFeatures.h>
#include <mitkGIFLocalIntensity.h>
#include <mitkGIFCurvatureStatistic.h>
#include <mitkGIFIntensityVolumeHistogramFeatures.h>
#include <mitkGIFNeighbourhoodGreyToneDifferenceFeatures.h>
#include <mitkGIFNeighbouringGreyLevelDependenceFeatures.h>
#include <mitkImageAccessByItk.h>
#include <mitkImageCast.h>
#include <mitkITKImageImport.h>
#include <mitkConvert2Dto3DImageFilter.h>
#include <mitkCLResultWritter.h>
#include <mitkVersion.h>
#include <iostream>
#include <locale>
#include <itkImageDuplicator.h>
#include <itkImageRegionIterator.h>
#include "itkNearestNeighborInterpolateImageFunction.h"
#include "itkResampleImageFilter.h"
#include <QApplication>
#include <mitkStandaloneDataStorage.h>
#include "QmitkRegisterClasses.h"
#include "QmitkRenderWindow.h"
#include "vtkRenderLargeImage.h"
#include "vtkPNGWriter.h"

Go to the source code of this file.

Macros

#define mitkCLPolyToNrrd_cpp
 

Typedefs

typedef itk::Image< double, 3 > FloatImageType
 
typedef itk::Image< unsigned short, 3 > MaskImageType
 

Functions

template<typename TPixel , unsigned int VImageDimension>
void ResampleImage (itk::Image< TPixel, VImageDimension > *itkImage, float resolution, mitk::Image::Pointer &newImage)
 
template<typename TPixel , unsigned int VImageDimension>
static void CreateNoNaNMask (itk::Image< TPixel, VImageDimension > *itkValue, mitk::Image::Pointer mask, mitk::Image::Pointer &newMask)
 
template<typename TPixel , unsigned int VImageDimension>
static void ResampleMask (itk::Image< TPixel, VImageDimension > *itkMoving, mitk::Image::Pointer ref, mitk::Image::Pointer &newMask)
 
static void ExtractSlicesFromImages (mitk::Image::Pointer image, mitk::Image::Pointer mask, mitk::Image::Pointer maskNoNaN, mitk::Image::Pointer morphMask, int direction, std::vector< mitk::Image::Pointer > &imageVector, std::vector< mitk::Image::Pointer > &maskVector, std::vector< mitk::Image::Pointer > &maskNoNaNVector, std::vector< mitk::Image::Pointer > &morphMaskVector)
 
static void SaveSliceOrImageAsPNG (mitk::Image::Pointer image, mitk::Image::Pointer mask, std::string path, int index)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

◆ mitkCLPolyToNrrd_cpp

#define mitkCLPolyToNrrd_cpp

Definition at line 13 of file CLGlobalImageFeatures.cpp.

Typedef Documentation

◆ FloatImageType

typedef itk::Image< double, 3 > FloatImageType

Definition at line 68 of file CLGlobalImageFeatures.cpp.

◆ MaskImageType

typedef itk::Image< unsigned short, 3 > MaskImageType

Definition at line 69 of file CLGlobalImageFeatures.cpp.

Function Documentation

◆ CreateNoNaNMask()

template<typename TPixel , unsigned int VImageDimension>
static void CreateNoNaNMask ( itk::Image< TPixel, VImageDimension > *  itkValue,
mitk::Image::Pointer  mask,
mitk::Image::Pointer newMask 
)
static

Definition at line 116 of file CLGlobalImageFeatures.cpp.

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

Referenced by main().

◆ ExtractSlicesFromImages()

static void ExtractSlicesFromImages ( mitk::Image::Pointer  image,
mitk::Image::Pointer  mask,
mitk::Image::Pointer  maskNoNaN,
mitk::Image::Pointer  morphMask,
int  direction,
std::vector< mitk::Image::Pointer > &  imageVector,
std::vector< mitk::Image::Pointer > &  maskVector,
std::vector< mitk::Image::Pointer > &  maskNoNaNVector,
std::vector< mitk::Image::Pointer > &  morphMaskVector 
)
static

Definition at line 179 of file CLGlobalImageFeatures.cpp.

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

Referenced by main().

◆ main()

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

Definition at line 361 of file CLGlobalImageFeatures.cpp.

References AccessByItk_2, mitkCommandLineParser::addArgument(), mitk::cl::FeatureResultWritter::AddColumn(), mitk::cl::FeatureResultWritter::AddHeader(), mitk::cl::GlobalImageFeaturesParameter::AddParameter(), mitk::cl::FeatureResultWritter::AddResult(), mitk::cl::FeatureResultWritter::AddSubjectInformation(), mitk::cl::GlobalImageFeaturesParameter::analysisMaskPath, mitk::cl::GlobalImageFeaturesParameter::anaylsisImagePath, us::any_cast(), CreateNoNaNMask(), mitk::cl::GlobalImageFeaturesParameter::decimalPoint, mitk::cl::GlobalImageFeaturesParameter::defineGlobalMaximumIntensity, mitk::cl::GlobalImageFeaturesParameter::defineGlobalMinimumIntensity, mitk::cl::GlobalImageFeaturesParameter::defineGlobalNumberOfBins, mitk::cl::GlobalImageFeaturesParameter::encodeParameter, mitk::cl::GlobalImageFeaturesParameter::ensureSameSpace, mitk::Equal(), ExtractSlicesFromImages(), mitk::cl::GlobalImageFeaturesParameter::globalMaximumIntensity, mitk::cl::GlobalImageFeaturesParameter::globalMinimumIntensity, mitk::cl::GlobalImageFeaturesParameter::globalNumberOfBins, image, mitk::cl::GlobalImageFeaturesParameter::imageFolder, mitk::cl::GlobalImageFeaturesParameter::imageName, mitk::cl::GlobalImageFeaturesParameter::imagePath, mitkCommandLineParser::Int, mitk::cl::GlobalImageFeaturesParameter::logfilePath, mask, mitk::cl::GlobalImageFeaturesParameter::maskName, mitk::cl::GlobalImageFeaturesParameter::maskPath, MITK_INFO, MITK_REVISION, mitk::cl::GlobalImageFeaturesParameter::morphPath, mitk::Convert2Dto3DImageFilter::New(), mitk::GIFLocalIntensity::New(), mitk::GIFNeighbourhoodGreyToneDifferenceFeatures::New(), mitk::Image::New(), mitk::GIFGreyLevelSizeZone::New(), mitk::GIFCooccurenceMatrix2::New(), mitk::GIFGreyLevelDistanceZone::New(), mitk::cl::GlobalImageFeaturesParameter::outputPath, mitkCommandLineParser::parseArguments(), mitk::cl::GlobalImageFeaturesParameter::ParseParameter(), mitk::cl::GlobalImageFeaturesParameter::pngScreenshotsPath, QmitkRegisterClasses(), ResampleImage(), mitk::cl::GlobalImageFeaturesParameter::resampleMask, ResampleMask(), mitk::cl::GlobalImageFeaturesParameter::resampleResolution, mitk::cl::GlobalImageFeaturesParameter::resampleToFixIsotropic, mitk::IOUtil::Save(), SaveSliceOrImageAsPNG(), mitkCommandLineParser::setArgumentPrefix(), mitkCommandLineParser::setCategory(), mitkCommandLineParser::setContributor(), mitk::cl::FeatureResultWritter::SetDecimalPoint(), mitkCommandLineParser::setDescription(), mitkCommandLineParser::setTitle(), mitk::cl::splitDouble(), mitkCommandLineParser::String, mitk::cl::GlobalImageFeaturesParameter::useDecimalPoint, mitk::cl::GlobalImageFeaturesParameter::useHeader, mitk::cl::GlobalImageFeaturesParameter::useLogfile, mitk::cl::GlobalImageFeaturesParameter::useMorphMask, mitk::cl::GlobalImageFeaturesParameter::writeAnalysisImage, mitk::cl::GlobalImageFeaturesParameter::writeAnalysisMask, and mitk::cl::GlobalImageFeaturesParameter::writePNGScreenshots.

◆ ResampleImage()

template<typename TPixel , unsigned int VImageDimension>
void ResampleImage ( itk::Image< TPixel, VImageDimension > *  itkImage,
float  resolution,
mitk::Image::Pointer newImage 
)

Definition at line 87 of file CLGlobalImageFeatures.cpp.

References mitk::GrabItkImageMemory().

Referenced by main().

◆ ResampleMask()

template<typename TPixel , unsigned int VImageDimension>
static void ResampleMask ( itk::Image< TPixel, VImageDimension > *  itkMoving,
mitk::Image::Pointer  ref,
mitk::Image::Pointer newMask 
)
static

Definition at line 156 of file CLGlobalImageFeatures.cpp.

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

Referenced by main().

◆ SaveSliceOrImageAsPNG()