Basic Image AlgorithmS Library
2.8.0
|
Class grouping together some IO code often used in (small) application, like loading images, parsing their meta data etc. More...
#include <Utils/IOUtils.hh>
Classes | |
class | ProgressBar |
struct | ProgressIndicator |
Static Public Member Functions | |
template<class ptType , class inPtType > | |
static bool | CheckType (inPtType *checked, ptType *&result) |
template<class ptType , class inPtType > | |
static bool | CheckTypeDelete (inPtType *checked, ptType *&result) |
static std::string | ExtendOutName (const std::string &outname, const std::string &suffix, const std::string &extension) |
Will take outname which is assumed to be of path/base.ext structure and will build path/base_extension.suffix from it. More... | |
static std::string | ExtendOutName (const std::string &outname, const std::string &extension) |
Will take outname which is assumed to be of path/base.ext structure and will build path/base_extension.ext from it. More... | |
static bool | ExtractSubPaths (const std::string &environmentVariable, std::vector< std::string > &subPaths) |
Seperates out the paths that are contained in a list of directories that are stored in an environment variable. More... | |
static bool | FindFile (const std::string &searchPaths, const std::string &baseFileName, std::string &fullFileName) |
Searches for the file specified by baseFileName in the specified searchPaths. More... | |
static bool | FindFileEnv (const std::string &environmentVariable, const std::string &baseFileName, std::string &fullFileName) |
Like FindFile() but reads out the searchPath from the specified environmentVariable. More... | |
static bool | FindShaderFile (const std::string &shaderFileName, std::string &res) |
Convenience wrapper to using SHADERSRC environment variable. More... | |
static int | GetApplicationMemory () |
static bool | GetProjection (ImageBase &imgBase, Projection &projOut) |
This is the implementation found in Camera::ParseMetaData() ! It allows to extract the Projection from ImageBase without the unconvenient type determination. More... | |
static bool | GetProjectionParametersPerspective (ImageBase &imgBase, BIAS::ProjectionParametersPerspective *&ppp) |
template<class dataType > | |
static bool | LoadCamera (std::string *fileName, BIAS::Camera< dataType > &cam) |
template<class dataType > | |
static bool | LoadCamera (const std::string &fileName, BIAS::Camera< dataType > &cam) |
template<class dataType > | |
static bool | LoadCamera (std::string *fileName, BIAS::Camera< dataType > &cam, BIAS::Projection &proj) |
template<class dataType > | |
static bool | LoadCamera (const std::string &fileName, BIAS::Camera< dataType > &cam, BIAS::Projection &proj) |
template<class dataType > | |
static bool | LoadCamera (const std::string &fileName, BIAS::Camera< dataType > &cam, BIAS::Projection &proj, unsigned int &width, unsigned int &height, unsigned int &channels) |
static bool | LoadCamera (const std::string *fileName, BIAS::ImageBase &cam, BIAS::Projection &proj) |
static bool | LoadCamera (const std::string *fileName, BIAS::ImageBase &cam, BIAS::ProjectionParametersPerspective *&ppp) |
template<class dataType > | |
static bool | LoadCamera (const std::string &fileName, BIAS::Camera< dataType > &cam, BIAS::ProjectionParametersPerspective *&proj, unsigned int &width, unsigned int &height, unsigned int &channels) |
static bool | LoadCamera (const std::string *fileName, BIAS::ImageBase &cam, BIAS::ProjectionParametersPerspectiveDepth *&ppp) |
template<class dataType > | |
static bool | LoadCamera (const std::string &fileName, BIAS::Camera< dataType > &cam, BIAS::ProjectionParametersPerspectiveDepth *&proj, unsigned int &width, unsigned int &height, unsigned int &channels) |
static bool | LoadFloat (const std::string &filename, BIAS::Image< float > &outcome) |
static bool | LoadImage (const std::string &fileName, ImageBase &img, unsigned int &width, unsigned int &height, unsigned int &channels) |
template<class type > | |
static bool | LoadImageList (const std::string &listFileName, std::vector< Image< type > > &imgs, const bool verbose=false) |
Takes in the name of a text file, that contains an image file-name per line, tries to load these images into the vector. More... | |
template<class type > | |
static bool | LoadImageList (const std::string &listFileName, std::vector< Image< type > > &imgs, std::vector< ProjectionParametersPerspective * > &ppp, const bool verbose=false) |
static bool | LoadImageList (const std::string &listFileName, std::vector< ImageBase > &imgs, std::vector< ProjectionParametersPerspective * > &ppp, const bool verbose=false) |
static bool | LoadImageList (const std::string &listFileName, std::vector< ImageBase > &imgs, std::vector< ProjectionParametersPerspective > &ppp, const bool verbose=false) |
static bool | LoadParameters (const std::string *fileName, BIAS::ProjectionParametersPerspective *&ppp) |
static bool | ParseCommandLineEvalHelp (Param ¶ms, int argc, char *argv[]) |
parses the command line, adds parameter "help" More... | |
static bool | ParseCommandLineEvalHelp (Param ¶ms, int argc, char *argv[], int &fup) |
parses the command line, adds parameter "help" and return first unknown parameter in fup More... | |
static void | PrintWithLineNumbers (const std::string &text, std::ostream &out=std::cout) |
static bool | ReadIn2DPointList (const std::string &fileName, std::vector< BIAS::Vector2< int > > &pointLst) |
Appends 2D points read in from file to vector. More... | |
static bool | ReadIn2DPointList (const std::string &fileName, std::vector< unsigned int > &xPos, std::vector< unsigned int > &yPos) |
template<class T > | |
static bool | ReadIn2DPointList (const std::string &fileName, std::vector< BIAS::Vector2< T > > &pointList) |
Reads a list of 2D points from a text file and appends them to the given vector. More... | |
template<class T > | |
static bool | ReadIn3DPointList (const std::string &fileName, std::vector< BIAS::Vector3< T > > &pointList) |
Reads a list of 3D points from a text file and appends them to the given vector. More... | |
template<class dataType > | |
static bool | SaveCamera (const std::string &fileName, const BIAS::Camera< dataType > &cam) |
template<class dataType > | |
static bool | SaveCamera (const std::string &fileName, BIAS::Camera< dataType > &cam, const BIAS::Projection &proj) |
static bool | SaveForPlot (const std::string &filename, const std::vector< double > &x_vector, const std::vector< double > &y_vector) |
template<class T > | |
static bool | Write2DPointWithDatumList (const std::string &fileName, std::vector< unsigned int > &xPos, std::vector< unsigned int > &yPos, std::vector< T > &datum) |
Class grouping together some IO code often used in (small) application, like loading images, parsing their meta data etc.
Definition at line 45 of file IOUtils.hh.
|
inlinestatic |
Definition at line 423 of file IOUtils.hh.
|
inlinestatic |
Definition at line 432 of file IOUtils.hh.
|
static |
Will take outname which is assumed to be of path/base.ext structure and will build path/base_extension.suffix from it.
Definition at line 138 of file IOUtils.cpp.
|
static |
Will take outname which is assumed to be of path/base.ext structure and will build path/base_extension.ext from it.
Definition at line 157 of file IOUtils.cpp.
|
static |
Seperates out the paths that are contained in a list of directories that are stored in an environment variable.
Definition at line 43 of file IOUtils.cpp.
|
static |
Searches for the file specified by baseFileName in the specified searchPaths.
searchPaths | is a string like returned by getenv, i.e. a path list seperated by a colon for Linux or a path list seperated by a semicolon for windows |
returns | true if file was found; |
Definition at line 77 of file IOUtils.cpp.
|
static |
Like FindFile() but reads out the searchPath from the specified environmentVariable.
Like FindFile but reads out the searchPath from the specified environmentVariable.
Definition at line 113 of file IOUtils.cpp.
Referenced by BIAS::SeparableBilateralFilter::Init().
|
static |
Convenience wrapper to using SHADERSRC environment variable.
Definition at line 127 of file IOUtils.cpp.
|
inlinestatic |
Definition at line 457 of file IOUtils.hh.
|
static |
This is the implementation found in Camera::ParseMetaData() ! It allows to extract the Projection from ImageBase without the unconvenient type determination.
Definition at line 244 of file IOUtils.cpp.
References BIAS::AppData::data, BIAS::MetaData::Find(), BIAS::ImageBase::GetMetaData(), BIAS::Projection::GetParameters(), BIAS::AppData::length, BIAS::ProjectionParametersBase::PoseValid(), BIAS::AppData::sdata, BIAS::AppData::tag, and BIAS::XMLBase::XMLReadFromString().
|
static |
Definition at line 224 of file IOUtils.cpp.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::Projection::GetParameters().
|
inlinestatic |
Definition at line 315 of file IOUtils.hh.
References BIAS::ImageIO::Load().
Referenced by LoadImageList().
|
inlinestatic |
Definition at line 326 of file IOUtils.hh.
References BIAS::ImageIO::Load().
|
inlinestatic |
Definition at line 338 of file IOUtils.hh.
References BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().
|
inlinestatic |
Definition at line 354 of file IOUtils.hh.
References BIAS::Camera< StorageType >::GetProj(), and BIAS::Camera< StorageType >::ParseMetaData().
|
inlinestatic |
Definition at line 370 of file IOUtils.hh.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
|
inlinestatic |
Definition at line 477 of file IOUtils.hh.
References BIAS::ImageIO::Load().
|
inlinestatic |
Definition at line 494 of file IOUtils.hh.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::Projection::GetParameters().
|
inlinestatic |
Definition at line 508 of file IOUtils.hh.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
|
inlinestatic |
Definition at line 526 of file IOUtils.hh.
References BIAS::ProjectionParametersBase::Clone(), and BIAS::Projection::GetParameters().
|
inlinestatic |
Definition at line 540 of file IOUtils.hh.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
|
static |
Definition at line 360 of file IOUtils.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), BIAS::ImageBase::GetMetaData(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), and BIAS::ImageBase::SetMetaData().
|
static |
Definition at line 412 of file IOUtils.cpp.
References BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetHeight(), and BIAS::ImageBase::GetWidth().
|
inlinestatic |
Takes in the name of a text file, that contains an image file-name per line, tries to load these images into the vector.
Definition at line 53 of file IOUtils.hh.
References BIAS::ImageIO::Load(), and BIAS::Param::ParseListFile().
|
inlinestatic |
Definition at line 78 of file IOUtils.hh.
References LoadCamera(), and BIAS::Param::ParseListFile().
|
inlinestatic |
Definition at line 108 of file IOUtils.hh.
References LoadCamera(), and BIAS::Param::ParseListFile().
|
inlinestatic |
Definition at line 137 of file IOUtils.hh.
|
inlinestatic |
Definition at line 441 of file IOUtils.hh.
References BIAS::ProjectionParametersBase::Clone(), BIAS::Projection::GetParameters(), and BIAS::Projection::Load().
|
static |
parses the command line, adds parameter "help"
Definition at line 176 of file IOUtils.cpp.
References BIAS::Param::AddParamBool(), BIAS::Param::GetFreeGroupID(), BIAS::Param::ParseCommandLine(), BIAS::Param::SetGroupName(), and BIAS::Param::Usage().
|
static |
parses the command line, adds parameter "help" and return first unknown parameter in fup
Definition at line 192 of file IOUtils.cpp.
References BIAS::Param::AddParamBool(), BIAS::Param::GetFreeGroupID(), BIAS::Param::ParseCommandLine(), BIAS::Param::SetGroupName(), and BIAS::Param::Usage().
|
static |
Definition at line 209 of file IOUtils.cpp.
|
static |
Appends 2D points read in from file to vector.
Definition at line 431 of file IOUtils.cpp.
|
static |
Definition at line 457 of file IOUtils.cpp.
|
inlinestatic |
Reads a list of 2D points from a text file and appends them to the given vector.
fileName | the name of the file to read from |
pointList | the list to add the points, note that it is not cleared so the points are appended |
Definition at line 209 of file IOUtils.hh.
|
inlinestatic |
Reads a list of 3D points from a text file and appends them to the given vector.
fileName | the name of the file to read from |
pointList | the list to add the points, note that it is not cleared so the points are appended |
Definition at line 245 of file IOUtils.hh.
|
inlinestatic |
Definition at line 389 of file IOUtils.hh.
References BIAS::ImageIO::Save().
|
inlinestatic |
Definition at line 400 of file IOUtils.hh.
References BIAS::Camera< StorageType >::SetProj(), and BIAS::Camera< StorageType >::UpdateMetaData().
|
static |
Definition at line 389 of file IOUtils.cpp.
|
inlinestatic |
Definition at line 164 of file IOUtils.hh.