diff --git a/code/interpolation/ITKTransformation/rttbITKTransformation.h b/code/interpolation/ITKTransformation/rttbITKTransformation.h index 641b7b2..43b4f3f 100644 --- a/code/interpolation/ITKTransformation/rttbITKTransformation.h +++ b/code/interpolation/ITKTransformation/rttbITKTransformation.h @@ -1,81 +1,83 @@ // ----------------------------------------------------------------------- // RTToolbox - DKFZ radiotherapy quantitative evaluation library // // Copyright (c) German Cancer Research Center (DKFZ), // Software development for Integrated Diagnostics and Therapy (SIDT). // ALL RIGHTS RESERVED. // See rttbCopyright.txt or // http://www.dkfz.de/en/sidt/projects/rttb/copyright.html // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notices for more information. // //------------------------------------------------------------------------ /*! // @file // @version $Revision$ (last changed revision) // @date $Date$ (last change date) // @author $Author$ (last changed by) */ #ifndef __ITK_MAPPABLE_DOSE_ACCESSOR_H #define __ITK_MAPPABLE_DOSE_ACCESSOR_H #include #include "itkTransform.h" #include "rttbDoseAccessorInterface.h" #include "rttbTransformationInterface.h" +#include "RTTBInterpolationITKTransformationExports.h" + namespace rttb { namespace interpolation { /*! @class ITKMappableDoseAccessor @brief This class can deal with dose information that has to be transformed into another geometry than the original dose image (transformation specified by ITK transformation object). */ - class ITKTransformation: public TransformationInterface + class RTTBInterpolationITKTransformation_EXPORT ITKTransformation : public TransformationInterface { public: static const unsigned int InputDimension3D = 3; static const unsigned int OutputDimension3D = 3; typedef double TransformScalarType; typedef itk::Transform Transform3D3DType; typedef Transform3D3DType::InputPointType InputPointType; typedef Transform3D3DType::OutputPointType OutputPointType; typedef boost::shared_ptr Pointer; private: //! Has to be a Pointer type because of inheritance issues with itkSmartPointer (that doesn't recognize the inheritance) const Transform3D3DType* _pTransformation; protected: void convert(const WorldCoordinate3D& aWorldCoordinate, InputPointType& aInputPoint) const; void convert(const OutputPointType& aOutputPoint, WorldCoordinate3D& aWorldCoordinate) const; public: /*! @brief Constructor. @param aRegistration registration given in MatchPoint format (note the pointer format since itkSmartPointer does not support inheritance) @sa MappableDoseAccessorBase @pre all input parameters have to be valid @exception core::NullPointerException if one input parameter is NULL @exception core::PaddingException if the transformation is undefined and if _acceptPadding==false */ ITKTransformation(const Transform3D3DType* aTransformation); ~ITKTransformation() {}; /*! @brief performs a transformation targetImage --> movingImage */ bool transformInverse(const WorldCoordinate3D& worldCoordinateTarget, WorldCoordinate3D& worldCoordinateMoving) const; /*! @brief performs a transformation movingImage --> targetImage */ bool transform(const WorldCoordinate3D& worldCoordinateMoving, WorldCoordinate3D& worldCoordinateTarget) const; }; } } #endif diff --git a/code/interpolation/MatchPointTransformation/rttbMatchPointTransformation.h b/code/interpolation/MatchPointTransformation/rttbMatchPointTransformation.h index e96d10c..1db91ae 100644 --- a/code/interpolation/MatchPointTransformation/rttbMatchPointTransformation.h +++ b/code/interpolation/MatchPointTransformation/rttbMatchPointTransformation.h @@ -1,82 +1,83 @@ // ----------------------------------------------------------------------- // RTToolbox - DKFZ radiotherapy quantitative evaluation library // // Copyright (c) German Cancer Research Center (DKFZ), // Software development for Integrated Diagnostics and Therapy (SIDT). // ALL RIGHTS RESERVED. // See rttbCopyright.txt or // http://www.dkfz.de/en/sidt/projects/rttb/copyright.html // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notices for more information. // //------------------------------------------------------------------------ /*! // @file // @version $Revision$ (last changed revision) // @date $Date$ (last change date) // @author $Author$ (last changed by) */ #ifndef __MATCHPOINT_TRANSFORMATION_H #define __MATCHPOINT_TRANSFORMATION_H #include #include "mapRegistration.h" #include "rttbTransformationInterface.h" #include "rttbBaseType.h" +#include "RTTBInterpolationMatchPointTransformationExports.h" namespace rttb { namespace interpolation { /*! @class MatchPointTransformation @brief This class can deal with dose information that has to be transformed into another geometry than the original dose image (transformation specified by MatchPoint registration object). @ingroup interpolation */ - class MatchPointTransformation: public TransformationInterface + class RTTBInterpolationMatchPointTransformation_EXPORT MatchPointTransformation : public TransformationInterface { public: static const unsigned int TargetDimension3D = 3; static const unsigned int MovingDimension3D = 3; typedef map::core::Registration Registration3D3DType; typedef map::core::Registration::MovingPointType MovingPointType; typedef map::core::Registration::TargetPointType TargetPointType; /*! @brief Constructor. @param aRegistration registration given in MatchPoint format (note the use of pointer since itkSmartPointer does not support inheritance) @pre all input parameters have to be valid @exception core::NullPointerException if one input parameter is NULL @exception core::PaddingException if the transformation is undefined and if _acceptPadding==false */ MatchPointTransformation(const Registration3D3DType* aRegistration); ~MatchPointTransformation() {}; /*! @brief performs a transformation targetImage --> movingImage */ bool transformInverse(const WorldCoordinate3D& worldCoordinateTarget, WorldCoordinate3D& worldCoordinateMoving) const override; /*! @brief performs a transformation movingImage --> targetImage */ bool transform(const WorldCoordinate3D& worldCoordinateMoving, WorldCoordinate3D& worldCoordinateTarget) const override; protected: void convert(const WorldCoordinate3D& aWorldCoordinate, TargetPointType& aTargetPoint) const; void convert(const MovingPointType& aMovingPoint, WorldCoordinate3D& aWorldCoordinate) const; private: //! Has to be a Pointer type because of inheritance issues with itkSmartPointer (that doesn't recognize the inheritance) const Registration3D3DType* _pRegistration; }; } } #endif diff --git a/code/interpolation/rttbTransformationInterface.h b/code/interpolation/rttbTransformationInterface.h index 4be7243..398df5a 100644 --- a/code/interpolation/rttbTransformationInterface.h +++ b/code/interpolation/rttbTransformationInterface.h @@ -1,71 +1,72 @@ // ----------------------------------------------------------------------- // RTToolbox - DKFZ radiotherapy quantitative evaluation library // // Copyright (c) German Cancer Research Center (DKFZ), // Software development for Integrated Diagnostics and Therapy (SIDT). // ALL RIGHTS RESERVED. // See rttbCopyright.txt or // http://www.dkfz.de/en/sidt/projects/rttb/copyright.html // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notices for more information. // //------------------------------------------------------------------------ /*! // @file // @version $Revision$ (last changed revision) // @date $Date$ (last change date) // @author $Author$ (last changed by) */ #ifndef __TRANSFORMATION_INTERFACE_H #define __TRANSFORMATION_INTERFACE_H #include #include "rttbDoseAccessorInterface.h" #include "rttbBaseType.h" +#include "RTTBInterpolationExports.h" namespace rttb { namespace interpolation { /*! @class TransformationInterface @brief Base class for transformation (in World coordinates). @ingroup interpolation */ - class TransformationInterface + class RTTBInterpolation_EXPORT TransformationInterface { public: typedef boost::shared_ptr Pointer; protected: /*! @brief Constructor */ TransformationInterface() {}; /*! @brief Virtual destructor of interface class */ virtual ~TransformationInterface() {}; public: /*! @brief performs a transformation targetImage --> movingImage */ virtual bool transformInverse(const WorldCoordinate3D& worldCoordinateTarget, WorldCoordinate3D& worldCoordinateMoving) const = 0; /*! @brief performs a transformation movingImage --> targetImage */ virtual bool transform(const WorldCoordinate3D& worldCoordinateMoving, WorldCoordinate3D& worldCoordinateTarget) const = 0; private: TransformationInterface(const TransformationInterface&);//not implemented on purpose -> non-copyable TransformationInterface& operator=(const TransformationInterface&);//not implemented on purpose -> non-copyable }; } } #endif diff --git a/code/io/itk/rttbITKImageAccessorConverter.h b/code/io/itk/rttbITKImageAccessorConverter.h index 62741cb..b6d12f1 100644 --- a/code/io/itk/rttbITKImageAccessorConverter.h +++ b/code/io/itk/rttbITKImageAccessorConverter.h @@ -1,71 +1,72 @@ // ----------------------------------------------------------------------- // RTToolbox - DKFZ radiotherapy quantitative evaluation library // // Copyright (c) German Cancer Research Center (DKFZ), // Software development for Integrated Diagnostics and Therapy (SIDT). // ALL RIGHTS RESERVED. // See rttbCopyright.txt or // http://www.dkfz.de/en/sidt/projects/rttb/copyright.html // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the above copyright notices for more information. // //------------------------------------------------------------------------ /*! // @file // @version $Revision$ (last changed revision) // @date $Date$ (last change date) // @author $Author$ (last changed by) */ #ifndef __ITK_IMAGE_ACCESSOR_CONVERTER_H #define __ITK_IMAGE_ACCESSOR_CONVERTER_H #include #include "rttbDoseAccessorProcessorBase.h" #include "rttbDoseAccessorConversionSettingInterface.h" #include "rttbITKImageAccessorConverter.h" #include "itkImage.h" +#include "RTTBITKIOExports.h" namespace rttb { namespace io { namespace itk { /*! @class ITKImageAccessorConverter @brief Class converts/dumps the processed accessor into an itk image @remark DoseAccessorConversionInterface defines how the converter should react on non valid dose values. */ - class ITKImageAccessorConverter: public core::DoseAccessorProcessorBase, + class RTTBITKIO_EXPORT ITKImageAccessorConverter : public core::DoseAccessorProcessorBase, public core::DoseAccessorConversionSettingInterface { public: typedef ::itk::Image ITKImageType; typedef core::DoseAccessorInterface::DoseAccessorPointer DoseAccessorPointer; bool process(); ITKImageType::Pointer getITKImage() { return _itkImage; } ITKImageAccessorConverter(DoseAccessorPointer accessor); virtual ~ITKImageAccessorConverter() {}; private: ITKImageAccessorConverter(const ITKImageAccessorConverter&); //not implemented on purpose -> non-copyable ITKImageAccessorConverter& operator=(const ITKImageAccessorConverter&);//not implemented on purpose -> non-copyable ITKImageType::Pointer _itkImage; }; } } } #endif