diff --git a/code/io/helax/CMakeLists.txt b/code/io/helax/CMakeLists.txt index cc0cd7e..7dff56a 100644 --- a/code/io/helax/CMakeLists.txt +++ b/code/io/helax/CMakeLists.txt @@ -1 +1 @@ -RTTB_CREATE_MODULE(RTTBHelaxIO DEPENDS RTTBCore RTTBDicomIO PACKAGE_DEPENDS BoostBinaries DCMTK) \ No newline at end of file +RTTB_CREATE_MODULE(RTTBHelaxIO DEPENDS RTTBCore RTTBDicomIO PACKAGE_DEPENDS PRIVATE Boost|filesystem DCMTK) \ No newline at end of file diff --git a/code/io/helax/rttbDicomHelaxDoseAccessor.h b/code/io/helax/rttbDicomHelaxDoseAccessor.h index 6edce97..98d8b69 100644 --- a/code/io/helax/rttbDicomHelaxDoseAccessor.h +++ b/code/io/helax/rttbDicomHelaxDoseAccessor.h @@ -1,94 +1,94 @@ // ----------------------------------------------------------------------- // 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. // //------------------------------------------------------------------------ #ifndef __DICOM_HELAX_DOSE_ACCESSOR_H #define __DICOM_HELAX_DOSE_ACCESSOR_H #include #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#include "drtdose.h" +#include "dcmtk/dcmrt/drtdose.h" #include "rttbBaseType.h" #include "rttbAccessorWithGeoInfoBase.h" namespace rttb { namespace io { namespace helax { /*! @class DicomHelaxDoseAccessor @brief Load dose data from a directory containing dicom dose files, each file describes the helax dose in one slice. */ class DicomHelaxDoseAccessor: public core::AccessorWithGeoInfoBase { public: using DRTDoseIODPtr = boost::shared_ptr; private: /*! vector of DRTDoseIOD shared pointers, each DRTDoseIOD pointer presents the dose in one slice*/ std::vector _doseVector; /*! vector of dose data(absolute Gy dose/doseGridScaling)*/ std::vector _doseData; double _doseGridScaling; IDType _doseUID; DicomHelaxDoseAccessor() = delete; protected: /*! @brief Initialize dose data @exception InvalidDoseException Thrown if any DRTDoseIOD pointer of _doseVector is invalid: one of column/row/numberOfFrames/doseGridScaling/pixelSpacing=0 @exception DcmrtException Throw if dcmrt error @exception boost/bad_lexical_cast Thrown if the imported header tags are not numerical. */ bool begin(); /*! @brief get all required data from dicom information contained in _dose @exception boost/bad_lexical_cast Thrown if the imported header tags are not numerical. */ void assembleGeometricInfo() override; public: ~DicomHelaxDoseAccessor() override; /*! @brief Constructor. Initialisation with a vector of DRTDoseIOD pointers @exception InvalidDoseException Thrown if any DRTDoseIOD pointer of _doseVector is invalid: one of column/row/numberOfFrames/doseGridScaling/pixelSpacing=0 @exception DcmrtException Throw if dcmrt error */ explicit DicomHelaxDoseAccessor(std::vector aDICOMRTDoseVector); GenericValueType getValueAt(const VoxelGridID aID) const override; GenericValueType getValueAt(const VoxelGridIndex3D& aIndex) const override; const IDType getUID() const override { return _doseUID; }; }; } } } #endif diff --git a/code/io/helax/rttbDicomHelaxFileDoseAccessorGenerator.h b/code/io/helax/rttbDicomHelaxFileDoseAccessorGenerator.h index 65d686f..283b21c 100644 --- a/code/io/helax/rttbDicomHelaxFileDoseAccessorGenerator.h +++ b/code/io/helax/rttbDicomHelaxFileDoseAccessorGenerator.h @@ -1,73 +1,73 @@ // ----------------------------------------------------------------------- // 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. // //------------------------------------------------------------------------ #ifndef __DICOM_HELAX_FILE_DOSE_ACCESSOR_GENERATOR_H #define __DICOM_HELAX_FILE_DOSE_ACCESSOR_GENERATOR_H #include #include #include #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#include "drtdose.h" +#include "dcmtk/dcmrt/drtdose.h" #include "rttbDoseAccessorGeneratorBase.h" #include "rttbBaseType.h" namespace rttb { namespace io { namespace helax { /*! @class DicomHelaxFileDoseAccessorGenerator @brief Load dose data from dicom helax files and generate DoseAccessor */ class DicomHelaxFileDoseAccessorGenerator: public core::DoseAccessorGeneratorBase { public: using DRTDoseIODPtr = boost::shared_ptr; protected: private: FileNameType _doseDirName; DicomHelaxFileDoseAccessorGenerator() = delete; public: ~DicomHelaxFileDoseAccessorGenerator() override; /*! @brief Constructor. Initialisation with a directory name */ explicit DicomHelaxFileDoseAccessorGenerator(FileNameType aDICOMRTDoseDirName); /*! @brief Generate DoseAccessor @return Return shared pointer of DoseAccessor. @exception InvalidParameterException Thrown if aDICOMRTDoseDirName is not found @exception InvalidDoseException Thrown if any loaded dose is invalid: one of column/row/numberOfFrames/doseGridScaling/pixelSpacing=0 @exception DcmrtException Throw if dcmrt error */ DoseAccessorPointer generateDoseAccessor() override ; }; } } } #endif diff --git a/code/io/helax/rttbDicomHelaxIODVecDoseAccessorGenerator.h b/code/io/helax/rttbDicomHelaxIODVecDoseAccessorGenerator.h index f3f55c7..5ed9498 100644 --- a/code/io/helax/rttbDicomHelaxIODVecDoseAccessorGenerator.h +++ b/code/io/helax/rttbDicomHelaxIODVecDoseAccessorGenerator.h @@ -1,68 +1,68 @@ // ----------------------------------------------------------------------- // 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. // //------------------------------------------------------------------------ #ifndef __DICOM_HELAX_IOD_VEC_DOSE_ACCESSOR_GENERATOR_H #define __DICOM_HELAX_IOD_VEC_DOSE_ACCESSOR_GENERATOR_H #include #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ -#include "drtdose.h" +#include "dcmtk/dcmrt/drtdose.h" #include "rttbDoseAccessorGeneratorBase.h" namespace rttb { namespace io { namespace helax { /*! @class DicomHelaxIODVecDoseAccessorGenerator @brief Generate DoseAccessor with a vector of DRTDoseIOD. */ class DicomHelaxIODVecDoseAccessorGenerator: public core::DoseAccessorGeneratorBase { public: using DRTDoseIODPtr = boost::shared_ptr; protected: private: std::vector _dosePtrVector; DicomHelaxIODVecDoseAccessorGenerator() = delete; public: ~DicomHelaxIODVecDoseAccessorGenerator() override; /*! @brief Constructor. Initialisation with a vector of DRTDoseIOD pointers */ explicit DicomHelaxIODVecDoseAccessorGenerator(std::vector& aDICOMRTDoseVector); /*! @brief Generate DoseAccessor @return Return shared pointer of DoseAccessor. @exception InvalidDoseException Thrown if any DRTDoseIOD pointer of _doseVector is invalid: one of column/row/numberOfFrames/doseGridScaling/pixelSpacing=0 @exception DcmrtException Throw if dcmrt error */ DoseAccessorPointer generateDoseAccessor() override ; }; } } } #endif diff --git a/testing/io/helax/CMakeLists.txt b/testing/io/helax/CMakeLists.txt index 8c09b8b..f23d9f8 100644 --- a/testing/io/helax/CMakeLists.txt +++ b/testing/io/helax/CMakeLists.txt @@ -1,23 +1,23 @@ #----------------------------------------------------------------------------- # Setup the system information test. Write out some basic failsafe # information in case the test doesn't run. #----------------------------------------------------------------------------- SET(HelaxIO_TEST ${EXECUTABLE_OUTPUT_PATH}/${RTToolbox_PREFIX}HelaxIOTests) SET(TEMP ${RTTBTesting_BINARY_DIR}/temporary) #----------------------------------------------------------------------------- ADD_TEST(DicomHelaxDoseAccessorGeneratorTest ${HelaxIO_TEST} DicomHelaxDoseAccessorGeneratorTest "${TEST_DATA_ROOT}/Dose/DICOM/Helax/" "${TEST_DATA_ROOT}/Dose/DICOM/ConstantTwo.dcm" "${TEST_DATA_ROOT}/Dose/DICOM/ConstantFifty.dcm" "${TEST_DATA_ROOT}/Dose/DICOM/LinearIncrease3D.dcm" ) ADD_TEST(DicomHelaxIOTest ${HelaxIO_TEST} DicomHelaxIOTest "${TEST_DATA_ROOT}/Dose/DICOM/Helax/" ) -RTTB_CREATE_TEST_MODULE(HelaxIO DEPENDS RTTBHelaxIO RTTBDicomIO PACKAGE_DEPENDS BoostBinaries Litmus RTTBData DCMTK) +RTTB_CREATE_TEST_MODULE(HelaxIO DEPENDS RTTBHelaxIO RTTBDicomIO PACKAGE_DEPENDS Boost Litmus RTTBData DCMTK)