diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/astra/ConeProjectionGeometry3D.h | 20 | ||||
| -rw-r--r-- | include/astra/ConeVecProjectionGeometry3D.h | 14 | ||||
| -rw-r--r-- | include/astra/Config.h | 3 | ||||
| -rw-r--r-- | include/astra/FanFlatProjectionGeometry2D.h | 6 | ||||
| -rw-r--r-- | include/astra/FanFlatVecProjectionGeometry2D.h | 15 | ||||
| -rw-r--r-- | include/astra/ParallelProjectionGeometry2D.h | 6 | ||||
| -rw-r--r-- | include/astra/ParallelProjectionGeometry3D.h | 20 | ||||
| -rw-r--r-- | include/astra/ParallelVecProjectionGeometry3D.h | 14 | ||||
| -rw-r--r-- | include/astra/ProjectionGeometry2D.h | 6 | ||||
| -rw-r--r-- | include/astra/ProjectionGeometry3D.h | 12 | ||||
| -rw-r--r-- | include/astra/SparseMatrixProjectionGeometry2D.h | 8 | ||||
| -rw-r--r-- | include/astra/VolumeGeometry2D.h | 6 | ||||
| -rw-r--r-- | include/astra/VolumeGeometry3D.h | 6 | ||||
| -rw-r--r-- | include/astra/XMLDocument.h | 3 | 
14 files changed, 98 insertions, 41 deletions
| diff --git a/include/astra/ConeProjectionGeometry3D.h b/include/astra/ConeProjectionGeometry3D.h index 2a0474d..00e72ce 100644 --- a/include/astra/ConeProjectionGeometry3D.h +++ b/include/astra/ConeProjectionGeometry3D.h @@ -40,8 +40,8 @@ namespace astra   * \par XML Configuration   * \astra_xml_item{DetectorRowCount, int, Number of detectors for each projection.}   * \astra_xml_item{DetectorColCount, int, Number of detectors for each projection.} - * \astra_xml_item{DetectorWidth, float, Width of each detector.} - * \astra_xml_item{DetectorHeight, float, Width of each detector.} + * \astra_xml_item{DetectorSpacingX, float, Width of each detector.} + * \astra_xml_item{DetectorSpacingY, float, Width of each detector.}   * \astra_xml_item{ProjectionAngles, vector of float, projection angles in radians.}   * \astra_xml_item{DistanceOriginDetector, float, Distance between the center of rotation and the detectorarray.}   * \astra_xml_item{DistanceOriginSource, float, Distance between the center of rotation the the x-ray source.} @@ -51,8 +51,8 @@ namespace astra   *		proj_geom = astra_struct('cone');\n   *		proj_geom.DetectorRowCount = 512;\n   *		proj_geom.DetectorColCount = 512;\n - *		proj_geom.DetectorWidth = 1.0;\n - *		proj_geom.DetectorHeight = 1.0;\n + *		proj_geom.DetectorSpacingX = 1.0;\n + *		proj_geom.DetectorSpacingY = 1.0;\n   *		proj_geom.ProjectionAngles = linspace(0,pi,100);\n   *		proj_geom.DistanceOriginDetector = 10000;\n   *		proj_geom.DistanceOriginSource = 10000;\n @@ -148,6 +148,12 @@ public:  	 */  	virtual bool isEqual(const CProjectionGeometry3D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +  	/** Returns true if the type of geometry defined in this class is the one specified in _sType.  	 *  	 * @param _sType geometry type to compare to. @@ -155,12 +161,6 @@ public:  	 */  	virtual bool isOfType(const std::string& _sType) const; -	/** Turn this object into an XML object. -	 * -	 * @param _sNode The XML object to fill. -	 */ -	virtual void toXML(XMLNode* _sNode) const; -  	/** Returns the distance from the origin of the coordinate system to the source.  	 *  	 * @return Distance from the origin of the coordinate system to the source diff --git a/include/astra/ConeVecProjectionGeometry3D.h b/include/astra/ConeVecProjectionGeometry3D.h index 68a80ef..e82a411 100644 --- a/include/astra/ConeVecProjectionGeometry3D.h +++ b/include/astra/ConeVecProjectionGeometry3D.h @@ -56,7 +56,7 @@ namespace astra   * to a single projection, and consists of:   * ( srcX, srcY, srcZ, dX, dY, dZ, uX, uY, uZ, vX, vY, vZ )   *      src: the ray source - *      d  : the corner of the detector + *      d  : the centre of the detector plane   *      u  : the vector from detector pixel (0,0) to (0,1)   *      v  : the vector from detector pixel (0,0) to (1,0)   */ @@ -128,6 +128,12 @@ public:  	 */  	virtual bool isEqual(const CProjectionGeometry3D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +  	/** Returns true if the type of geometry defined in this class is the one specified in _sType.  	 *  	 * @param _sType geometry type to compare to. @@ -135,12 +141,6 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType) const; -	/** Turn this object into an XML object. -	 * -	 * @param _sNode The XML object to fill. -	 */ -	 virtual void toXML(XMLNode* _sNode) const; -  	 /**  	  * Returns a vector giving the projection direction for a projection and detector index  	  */ diff --git a/include/astra/Config.h b/include/astra/Config.h index 647462b..9893c90 100644 --- a/include/astra/Config.h +++ b/include/astra/Config.h @@ -31,6 +31,7 @@ $Id$  #include "Globals.h"  #include "XMLNode.h" +#include "XMLDocument.h"  #include <set> @@ -46,6 +47,8 @@ struct _AstraExport Config {  	Config(XMLNode* _self);  	~Config(); +	void initialize(std::string rootname); +  	XMLNode* self;  	XMLNode* global;  }; diff --git a/include/astra/FanFlatProjectionGeometry2D.h b/include/astra/FanFlatProjectionGeometry2D.h index 8f22c35..180fe68 100644 --- a/include/astra/FanFlatProjectionGeometry2D.h +++ b/include/astra/FanFlatProjectionGeometry2D.h @@ -140,6 +140,12 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType); +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +      /** Return true if this geometry instance is the same as the one specified.  	 *  	 * @return true if this geometry instance is the same as the one specified. diff --git a/include/astra/FanFlatVecProjectionGeometry2D.h b/include/astra/FanFlatVecProjectionGeometry2D.h index 85c994f..ee85408 100644 --- a/include/astra/FanFlatVecProjectionGeometry2D.h +++ b/include/astra/FanFlatVecProjectionGeometry2D.h @@ -53,6 +53,14 @@ namespace astra   *		proj_geom.DetectorCount = 512;\n   *		proj_geom.Vectors = V;\n   * } + * + * \par Vectors + * Vectors is a matrix containing the actual geometry. Each row corresponds + * to a single projection, and consists of: + * ( srcX, srcY, srcZ, dX, dY uX, uY) + *      src: the ray source + *      d  : the centre of the detector array + *      u  : the vector from detector 0 to detector 1   */  class _AstraExport CFanFlatVecProjectionGeometry2D : public CProjectionGeometry2D  { @@ -126,6 +134,13 @@ public:  	 */  	virtual bool isEqual(CProjectionGeometry2D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; + +  	/** Get the value for t and theta, based upon the row and column index.  	 *  	 * @param _iRow		row index  diff --git a/include/astra/ParallelProjectionGeometry2D.h b/include/astra/ParallelProjectionGeometry2D.h index ed9d228..2f7d36f 100644 --- a/include/astra/ParallelProjectionGeometry2D.h +++ b/include/astra/ParallelProjectionGeometry2D.h @@ -136,6 +136,12 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType); +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +   	/**  	 * Returns a vector describing the direction of a ray belonging to a certain detector,  	 *   the direction is the same for all detectors in one projection  diff --git a/include/astra/ParallelProjectionGeometry3D.h b/include/astra/ParallelProjectionGeometry3D.h index da60617..72401e5 100644 --- a/include/astra/ParallelProjectionGeometry3D.h +++ b/include/astra/ParallelProjectionGeometry3D.h @@ -41,8 +41,8 @@ namespace astra   * \par XML Configuration   * \astra_xml_item{DetectorRowCount, int, Number of detectors for each projection.}   * \astra_xml_item{DetectorColCount, int, Number of detectors for each projection.} - * \astra_xml_item{DetectorWidth, float, Width of each detector.} - * \astra_xml_item{DetectorHeight, float, Width of each detector.} + * \astra_xml_item{DetectorSpacingX, float, Width of each detector.} + * \astra_xml_item{DetectorSpacingY, float, Width of each detector.}   * \astra_xml_item{ProjectionAngles, vector of float, projection angles in radians.}   *   * \par MATLAB example @@ -50,8 +50,8 @@ namespace astra   *		proj_geom = astra_struct('parallel');\n   *		proj_geom.DetectorRowCount = 512;\n   *		proj_geom.DetectorColCount = 512;\n - *		proj_geom.DetectorWidth = 1.0;\n - *		proj_geom.DetectorHeight = 1.0;\n + *		proj_geom.DetectorSpacingX = 1.0;\n + *		proj_geom.DetectorSpacingY = 1.0;\n   *		proj_geom.ProjectionAngles = linspace(0,pi,100);\n   * }   */ @@ -129,6 +129,12 @@ public:  	 */  	virtual bool isEqual(const CProjectionGeometry3D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +  	/** Returns true if the type of geometry defined in this class is the one specified in _sType.  	 *  	 * @param _sType geometry type to compare to. @@ -136,12 +142,6 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType) const; -	/** Turn this object into an XML object. -	 * -	 * @param _sNode The XML object to fill. -	 */ -	 virtual void toXML(XMLNode* _sNode) const; -  	 /**  	  * Returns a vector giving the projection direction for a projection and detector index  	  */ diff --git a/include/astra/ParallelVecProjectionGeometry3D.h b/include/astra/ParallelVecProjectionGeometry3D.h index fbc2112..5a63249 100644 --- a/include/astra/ParallelVecProjectionGeometry3D.h +++ b/include/astra/ParallelVecProjectionGeometry3D.h @@ -55,7 +55,7 @@ namespace astra   * to a single projection, and consists of:   * ( rayX, rayY, rayZ, dX, dY, dZ, uX, uY, uZ, vX, vY, vZ )   *      ray: the ray direction - *      d  : the corner of the detector + *      d  : the centre of the detector plane   *      u  : the vector from detector pixel (0,0) to (0,1)   *      v  : the vector from detector pixel (0,0) to (1,0)   */ @@ -128,6 +128,12 @@ public:  	 */  	virtual bool isEqual(const CProjectionGeometry3D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +  	/** Returns true if the type of geometry defined in this class is the one specified in _sType.  	 *  	 * @param _sType geometry type to compare to. @@ -135,12 +141,6 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType) const; -	/** Turn this object into an XML object. -	 * -	 * @param _sNode The XML object to fill. -	 */ -	 virtual void toXML(XMLNode* _sNode) const; -  	 /**  	  * Returns a vector giving the projection direction for a projection and detector index  	  */ diff --git a/include/astra/ProjectionGeometry2D.h b/include/astra/ProjectionGeometry2D.h index 303ca0a..b8324e2 100644 --- a/include/astra/ProjectionGeometry2D.h +++ b/include/astra/ProjectionGeometry2D.h @@ -157,6 +157,12 @@ public:  	 */  	virtual bool isEqual(CProjectionGeometry2D*) const = 0; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const = 0; +  	/** Get the number of projection angles.  	 *  	 * @return Number of projection angles diff --git a/include/astra/ProjectionGeometry3D.h b/include/astra/ProjectionGeometry3D.h index 41b1cb7..19ac3ab 100644 --- a/include/astra/ProjectionGeometry3D.h +++ b/include/astra/ProjectionGeometry3D.h @@ -187,6 +187,12 @@ public:  	 */  	virtual bool isEqual(const CProjectionGeometry3D *) const = 0; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const = 0; +  	/** Get the number of projections.  	 *  	 * @return Number of projections @@ -322,12 +328,6 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType) const = 0; -	/** Turn this object into an XML object. -	 * -	 * @param _sNode The XML object to fill. -	 */ -	 virtual void toXML(XMLNode* _sNode) const = 0; -  	 /**  	  * Returns a vector giving the projection direction for a projection and detector index  	  */ diff --git a/include/astra/SparseMatrixProjectionGeometry2D.h b/include/astra/SparseMatrixProjectionGeometry2D.h index 36964be..d56f95e 100644 --- a/include/astra/SparseMatrixProjectionGeometry2D.h +++ b/include/astra/SparseMatrixProjectionGeometry2D.h @@ -103,7 +103,6 @@ public:  	 * @param _pMatrix Pointer to a CSparseMatrix. The caller is responsible for keeping this matrix valid until it is no longer required.  	 * @return initialization successful?  	 */ -  	bool setMatrix(CSparseMatrix* _pMatrix);  	/** Get a pointer to the associated sparse matrix. @@ -128,6 +127,13 @@ public:  	 */  	 virtual bool isOfType(const std::string& _sType); +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; + +  	/**  	 * Returns a vector describing the direction of a ray belonging to a certain detector  	 * diff --git a/include/astra/VolumeGeometry2D.h b/include/astra/VolumeGeometry2D.h index fa0528d..28703d5 100644 --- a/include/astra/VolumeGeometry2D.h +++ b/include/astra/VolumeGeometry2D.h @@ -205,6 +205,12 @@ public:  	 */  	virtual bool isEqual(CVolumeGeometry2D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +  	/** Get the number of columns in the volume grid.  	 *  	 * @return Number of columns in the volume grid. diff --git a/include/astra/VolumeGeometry3D.h b/include/astra/VolumeGeometry3D.h index d5c8fff..ff94844 100644 --- a/include/astra/VolumeGeometry3D.h +++ b/include/astra/VolumeGeometry3D.h @@ -246,6 +246,12 @@ public:  	 */  	virtual bool isEqual(const CVolumeGeometry3D*) const; +	/** Get all settings in a Config object. +	 * +	 * @return Configuration Object. +	 */ +	virtual Config* getConfiguration() const; +  	/** Get the number of columns in the volume grid.  	 *  	 * @return Number of columns in the volume grid. diff --git a/include/astra/XMLDocument.h b/include/astra/XMLDocument.h index c6f1b9a..869e1a3 100644 --- a/include/astra/XMLDocument.h +++ b/include/astra/XMLDocument.h @@ -86,6 +86,9 @@ public:  	 */  	void saveToFile(string sFilename); +	/** convert and XML DOM tree to a string +	 */ +	std::string toString();  private: | 
