Medical Imaging Interaction Toolkit  2018.4.99-07c45cb1
Medical Imaging Interaction Toolkit
mitk::pa::IOUtil Class Referencefinal

#include <mitkPAIOUtil.h>

Classes

struct  Position
 

Static Public Member Functions

static std::map< Position, Volume::Pointer > LoadFluenceContributionMaps (std::string foldername, double blur, int *progress, bool log10=false)
 LoadFluenceContributionMaps loads multiple nrrd files from a given folder and sorts them into a position map if such meta information is available in the filename. As this method was specifically designed to load many fluence files, the naming convention for the position values is: More...
 
static Volume::Pointer LoadNrrd (std::string filename, double sigma=0)
 loads a nrrd file from a given filename. More...
 
static int GetNumberOfNrrdFilesInDirectory (std::string directory)
 returns the number of .nrrd files in a given directory More...
 
static std::vector< std::string > GetListOfAllNrrdFilesInDirectory (std::string directory, bool keepFileFormat=false)
 returns a list of all .nrrd files in a given directory More...
 
static bool DoesFileHaveEnding (std::string const &fullString, std::string const &ending)
 convenience method to check wether a given strings ends on a given substring. More...
 
static std::vector< std::string > GetAllChildfoldersFromFolder (std::string folderPath)
 returns all child folders from a folder if there is no .nrrd file in the folder If there IS a .nrrd file in the folder this method will return the given folder path. More...
 
static InSilicoTissueVolume::Pointer LoadInSilicoTissueVolumeFromNrrdFile (std::string filePath)
 loads an in silico tissue volume from a saved nrrd file. More...
 
static FluenceYOffsetPair::Pointer LoadFluenceSimulation (std::string fluenceSimulation)
 LoadFluenceSimulation Adds a MC Simulation nrrd file to this composed volume. The given file needs to contain the meta information "y-offset". This method ensures that all added slices are in the correct order corresponding to their y-offset. More...
 

Detailed Description

Definition at line 32 of file mitkPAIOUtil.h.

Member Function Documentation

◆ DoesFileHaveEnding()

bool mitk::pa::IOUtil::DoesFileHaveEnding ( std::string const &  fullString,
std::string const &  ending 
)
static

convenience method to check wether a given strings ends on a given substring.

Returns
false if the substring is longer than the string or if the strings are empty.

Definition at line 43 of file mitkPAIOUtil.cpp.

Referenced by GetAllChildfoldersFromFolder(), GetListOfAllNrrdFilesInDirectory(), and LoadFluenceContributionMaps().

◆ GetAllChildfoldersFromFolder()

std::vector< std::string > mitk::pa::IOUtil::GetAllChildfoldersFromFolder ( std::string  folderPath)
static

returns all child folders from a folder if there is no .nrrd file in the folder If there IS a .nrrd file in the folder this method will return the given folder path.

Definition at line 145 of file mitkPAIOUtil.cpp.

References DoesFileHaveEnding(), and MITK_INFO.

◆ GetListOfAllNrrdFilesInDirectory()

std::vector< std::string > mitk::pa::IOUtil::GetListOfAllNrrdFilesInDirectory ( std::string  directory,
bool  keepFileFormat = false 
)
static

returns a list of all .nrrd files in a given directory

Definition at line 118 of file mitkPAIOUtil.cpp.

References DoesFileHaveEnding().

Referenced by GetNumberOfNrrdFilesInDirectory().

◆ GetNumberOfNrrdFilesInDirectory()

int mitk::pa::IOUtil::GetNumberOfNrrdFilesInDirectory ( std::string  directory)
static

returns the number of .nrrd files in a given directory

Definition at line 113 of file mitkPAIOUtil.cpp.

References GetListOfAllNrrdFilesInDirectory().

◆ LoadFluenceContributionMaps()

std::map< mitk::pa::IOUtil::Position, mitk::pa::Volume::Pointer > mitk::pa::IOUtil::LoadFluenceContributionMaps ( std::string  foldername,
double  blur,
int *  progress,
bool  log10 = false 
)
static

LoadFluenceContributionMaps loads multiple nrrd files from a given folder and sorts them into a position map if such meta information is available in the filename. As this method was specifically designed to load many fluence files, the naming convention for the position values is:

*_pN,N,NFluence*.nrrd

Parameters
foldername
blur
progress
Returns

Definition at line 72 of file mitkPAIOUtil.cpp.

References DoesFileHaveEnding(), LoadNrrd(), mitk::pa::VolumeManipulator::Log10Image(), MITK_DEBUG, MITK_ERROR, mitkThrow, and splitString().

◆ LoadFluenceSimulation()

mitk::pa::FluenceYOffsetPair::Pointer mitk::pa::IOUtil::LoadFluenceSimulation ( std::string  fluenceSimulation)
static

LoadFluenceSimulation Adds a MC Simulation nrrd file to this composed volume. The given file needs to contain the meta information "y-offset". This method ensures that all added slices are in the correct order corresponding to their y-offset.

Parameters
nrrdFilepath to the nrrd file on hard drive

Definition at line 233 of file mitkPAIOUtil.cpp.

References MITK_INFO, mitkThrow, mitk::pa::Volume::New(), mbilog::replace, and yOffset.

◆ LoadInSilicoTissueVolumeFromNrrdFile()

mitk::pa::InSilicoTissueVolume::Pointer mitk::pa::IOUtil::LoadInSilicoTissueVolumeFromNrrdFile ( std::string  filePath)
static

loads an in silico tissue volume from a saved nrrd file.

Definition at line 177 of file mitkPAIOUtil.cpp.

References mitk::eps, MITK_INFO, mitk::pa::TissueGeneratorParameters::New(), mitk::pa::Volume::New(), and mitk::pa::InSilicoTissueVolume::New().

◆ LoadNrrd()

mitk::pa::Volume::Pointer mitk::pa::IOUtil::LoadNrrd ( std::string  filename,
double  sigma = 0 
)
static

loads a nrrd file from a given filename.

Parameters
filename
sigma
Returns
nullptr if the given filename was invalid.

Definition at line 54 of file mitkPAIOUtil.cpp.

References mitk::pa::VolumeManipulator::GaussianBlur3D(), and mitk::pa::Volume::New().

Referenced by LoadFluenceContributionMaps().


The documentation for this class was generated from the following files: