diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-02-27 11:46:29 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2015-02-27 11:46:29 +0100 |
commit | 03a9dd972ada50eedb83386910cecf02fe8d0e35 (patch) | |
tree | f764bff6a8109d42445bdd1db622fd739baf5d4a /matlab/mex/mexHelpFunctions.h | |
parent | 9e2bb413a937aefe57f4fcf343413543ae57258a (diff) | |
parent | 169e912d2633cda7ffc234e78afba1b096e122ea (diff) | |
download | astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.tar.gz astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.tar.bz2 astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.tar.xz astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.zip |
Merge pull request #20 from wvaarle/matlab-get-geometry
'get_geometry' functions in the matlab layer
Diffstat (limited to 'matlab/mex/mexHelpFunctions.h')
-rw-r--r-- | matlab/mex/mexHelpFunctions.h | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/matlab/mex/mexHelpFunctions.h b/matlab/mex/mexHelpFunctions.h index 84372ba..f9ffcf2 100644 --- a/matlab/mex/mexHelpFunctions.h +++ b/matlab/mex/mexHelpFunctions.h @@ -43,34 +43,31 @@ $Id$ #include "astra/Globals.h" #include "astra/Utilities.h" -#include "astra/ParallelProjectionGeometry2D.h" -#include "astra/FanFlatProjectionGeometry2D.h" -#include "astra/VolumeGeometry2D.h" - +#include "astra/Config.h" #include "astra/XMLDocument.h" #include "astra/XMLNode.h" -std::string mex_util_get_string(const mxArray* pInput); -bool isOption(std::list<std::string> lOptions, std::string sOption); - -bool mex_is_scalar(const mxArray* pInput); +// utility functions +string mexToString(const mxArray* pInput); +bool mexIsScalar(const mxArray* pInput); +void get3DMatrixDims(const mxArray* x, mwSize *dims); -std::map<std::string, mxArray*> parseStruct(const mxArray* pInput); -mxArray* buildStruct(std::map<std::string, mxArray*> mInput); +// convert boost::any into a MALTAB object mxArray* vectorToMxArray(std::vector<astra::float32> mInput); - mxArray* anyToMxArray(boost::any _any); -astra::CProjectionGeometry2D* parseProjectionGeometryStruct(const mxArray*); -mxArray* createProjectionGeometryStruct(astra::CProjectionGeometry2D*); -astra::CVolumeGeometry2D* parseVolumeGeometryStruct(const mxArray*); -mxArray* createVolumeGeometryStruct(astra::CVolumeGeometry2D* _pReconGeom); +// turn a MATLAB struct into a Config object +astra::Config* structToConfig(string rootname, const mxArray* pStruct); +bool structToXMLNode(astra::XMLNode* node, const mxArray* pStruct); +bool optionsToXMLNode(astra::XMLNode* node, const mxArray* pOptionStruct); +std::map<std::string, mxArray*> parseStruct(const mxArray* pInput); -astra::XMLDocument* struct2XML(string rootname, const mxArray* pStruct); +// turn a Config object into a MATLAB struct +mxArray* configToStruct(astra::Config* cfg); +mxArray* XMLNodeToStruct(astra::XMLNode* xml); +mxArray* stringToMxArray(std::string input); +mxArray* buildStruct(std::map<std::string, mxArray*> mInput); -mxArray* XML2struct(astra::XMLDocument* xml); -mxArray* XMLNode2struct(astra::XMLNode* xml); -void get3DMatrixDims(const mxArray* x, mwSize *dims); #endif |