diff --git a/Modules/ContourModel/IO/mitkContourModelReader.h b/Modules/ContourModel/IO/mitkContourModelReader.h index 849b4f181e..bbeae0a7ec 100644 --- a/Modules/ContourModel/IO/mitkContourModelReader.h +++ b/Modules/ContourModel/IO/mitkContourModelReader.h @@ -1,56 +1,56 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_CONTOURMODEL_READER__H_ #define _MITK_CONTOURMODEL_READER__H_ // MITK #include #include #include #include #include #include #include #include namespace mitk { /** * @brief * @ingroup MitkContourModelModule */ class ContourModelReader : public mitk::AbstractFileReader { public: ContourModelReader(const ContourModelReader &other); ContourModelReader(); ~ContourModelReader() override; using AbstractFileReader::Read; protected: virtual void ReadPoints(mitk::ContourModel::Pointer newContourModel, TiXmlElement *currentTimeSeries, unsigned int currentTimeStep); - std::vector DoRead() override; + std::vector> DoRead() override; private: ContourModelReader *Clone() const override; us::ServiceRegistration m_ServiceReg; }; } #endif diff --git a/Modules/ContourModel/IO/mitkContourModelSetReader.h b/Modules/ContourModel/IO/mitkContourModelSetReader.h index 9ddfe1f048..91e24180a1 100644 --- a/Modules/ContourModel/IO/mitkContourModelSetReader.h +++ b/Modules/ContourModel/IO/mitkContourModelSetReader.h @@ -1,54 +1,54 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_ContourModelSetReader__H_ #define _MITK_ContourModelSetReader__H_ // MITK #include #include #include #include #include #include #include #include #include namespace mitk { /** * @brief * @ingroup MitkContourModelModule */ class ContourModelSetReader : public mitk::AbstractFileReader { public: ContourModelSetReader(const ContourModelSetReader &other); ContourModelSetReader(); ~ContourModelSetReader() override; using AbstractFileReader::Read; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: ContourModelSetReader *Clone() const override; us::ServiceRegistration m_ServiceReg; }; } #endif diff --git a/Modules/Core/src/IO/mitkImageVtkLegacyIO.h b/Modules/Core/src/IO/mitkImageVtkLegacyIO.h index b268ec5f59..efffa19b9d 100644 --- a/Modules/Core/src/IO/mitkImageVtkLegacyIO.h +++ b/Modules/Core/src/IO/mitkImageVtkLegacyIO.h @@ -1,43 +1,43 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKIMAGEVTKLEGACYIO_H #define MITKIMAGEVTKLEGACYIO_H #include "mitkAbstractFileIO.h" namespace mitk { class ImageVtkLegacyIO : public mitk::AbstractFileIO { public: ImageVtkLegacyIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: ImageVtkLegacyIO *IOClone() const override; }; } #endif // MITKIMAGEVTKLEGACYIO_H diff --git a/Modules/Core/src/IO/mitkImageVtkXmlIO.h b/Modules/Core/src/IO/mitkImageVtkXmlIO.h index 103e3cb3f1..5edc030350 100644 --- a/Modules/Core/src/IO/mitkImageVtkXmlIO.h +++ b/Modules/Core/src/IO/mitkImageVtkXmlIO.h @@ -1,43 +1,43 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKIMAGEVTKXMLIO_H #define MITKIMAGEVTKXMLIO_H #include "mitkAbstractFileIO.h" namespace mitk { class ImageVtkXmlIO : public mitk::AbstractFileIO { public: ImageVtkXmlIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: ImageVtkXmlIO *IOClone() const override; }; } #endif // MITKIMAGEVTKXMLIO_H diff --git a/Modules/Core/src/IO/mitkPointSetReaderService.h b/Modules/Core/src/IO/mitkPointSetReaderService.h index 571cb18e09..5aba51b592 100644 --- a/Modules/Core/src/IO/mitkPointSetReaderService.h +++ b/Modules/Core/src/IO/mitkPointSetReaderService.h @@ -1,62 +1,62 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_POINT_SET_READER_SERVICE__H_ #define _MITK_POINT_SET_READER_SERVICE__H_ // MITK #include #include class TiXmlElement; namespace mitk { /** * @internal * * @brief reads xml representations of mitk::PointSets from a file * * Reader for xml files containing one or multiple xml represenations of * mitk::PointSet. If multiple mitk::PointSet objects are stored in one file, * these are assigned to multiple BaseData objects. * * The reader is able to read the old 3D Pointsets without the "specification" and "timeseries" tags and the new 4D * Pointsets. * * @ingroup IO */ class PointSetReaderService : public AbstractFileReader { public: PointSetReaderService(); ~PointSetReaderService() override; using AbstractFileReader::Read; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: PointSetReaderService(const PointSetReaderService &other); mitk::BaseGeometry::Pointer ReadGeometry(TiXmlElement *parentElement); mitk::PointSet::Pointer ReadPoints(mitk::PointSet::Pointer newPointSet, TiXmlElement *currentTimeSeries, unsigned int currentTimeStep); PointSetReaderService *Clone() const override; }; } #endif diff --git a/Modules/Core/src/IO/mitkRawImageFileReader.h b/Modules/Core/src/IO/mitkRawImageFileReader.h index e7ef8bc040..3ad97d9199 100644 --- a/Modules/Core/src/IO/mitkRawImageFileReader.h +++ b/Modules/Core/src/IO/mitkRawImageFileReader.h @@ -1,54 +1,54 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKRAWIMAGEFILEREADER_H_ #define MITKRAWIMAGEFILEREADER_H_ #include "mitkAbstractFileReader.h" namespace mitk { /** * The user must set the dimensionality, the dimensions and the pixel type. * If they are incorrect, the image will not be opened or the visualization will be incorrect. */ class RawImageFileReaderService : public AbstractFileReader { public: /** Supported pixel types. */ typedef enum { UCHAR, SCHAR, USHORT, SSHORT, UINT, SINT, FLOAT, DOUBLE } IOPixelType; /** Endianity of bits. */ typedef enum { LITTLE, BIG } EndianityType; RawImageFileReaderService(); protected: RawImageFileReaderService(const RawImageFileReaderService &other); - std::vector DoRead() override; + std::vector> DoRead() override; using mitk::AbstractFileReader::Read; private: template mitk::BaseData::Pointer TypedRead(const std::string &path, EndianityType endianity, int *size); RawImageFileReaderService *Clone() const override; /** Vector containing dimensions of image to be read. */ itk::Vector m_Dimensions; }; } // namespace mitk #endif /* MITKRAWIMAGEFILEREADER_H_ */ diff --git a/Modules/Core/src/IO/mitkSurfaceStlIO.h b/Modules/Core/src/IO/mitkSurfaceStlIO.h index 6d02b70802..ffe36e1e60 100644 --- a/Modules/Core/src/IO/mitkSurfaceStlIO.h +++ b/Modules/Core/src/IO/mitkSurfaceStlIO.h @@ -1,45 +1,45 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_SURFACE_STL_IO_H_ #define _MITK_SURFACE_STL_IO_H_ #include "mitkSurfaceVtkIO.h" namespace mitk { class SurfaceStlIO : public mitk::SurfaceVtkIO { public: SurfaceStlIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; // -------------- AbstractFileWriter ------------- void Write() override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: SurfaceStlIO *IOClone() const override; static std::string OPTION_MERGE_POINTS(); static std::string OPTION_TAG_SOLIDS(); static std::string OPTION_CLEAN(); }; } #endif //_MITK_SURFACE_STL_IO_H_ diff --git a/Modules/Core/src/IO/mitkSurfaceVtkLegacyIO.h b/Modules/Core/src/IO/mitkSurfaceVtkLegacyIO.h index 4d1a6f0667..7be88eaceb 100644 --- a/Modules/Core/src/IO/mitkSurfaceVtkLegacyIO.h +++ b/Modules/Core/src/IO/mitkSurfaceVtkLegacyIO.h @@ -1,45 +1,45 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_SURFACE_VTK_LEGACY_IO_H_ #define _MITK_SURFACE_VTK_LEGACY_IO_H_ #include "mitkSurfaceVtkIO.h" #include "mitkBaseData.h" namespace mitk { class SurfaceVtkLegacyIO : public mitk::SurfaceVtkIO { public: SurfaceVtkLegacyIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: SurfaceVtkLegacyIO *IOClone() const override; }; } #endif //_MITK_SURFACE_VTK_LEGACY_IO_H_ diff --git a/Modules/Core/src/IO/mitkSurfaceVtkXmlIO.h b/Modules/Core/src/IO/mitkSurfaceVtkXmlIO.h index a236da6d4f..ed4daa3a49 100644 --- a/Modules/Core/src/IO/mitkSurfaceVtkXmlIO.h +++ b/Modules/Core/src/IO/mitkSurfaceVtkXmlIO.h @@ -1,45 +1,45 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_SURFACE_VTK_XML_IO_H_ #define _MITK_SURFACE_VTK_XML_IO_H_ #include "mitkSurfaceVtkIO.h" #include "mitkBaseData.h" namespace mitk { class SurfaceVtkXmlIO : public mitk::SurfaceVtkIO { public: SurfaceVtkXmlIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: SurfaceVtkXmlIO *IOClone() const override; }; } #endif //_MITK_SURFACE_VTK_XML_IO_H_ diff --git a/Modules/DICOMPM/autoload/DICOMPMIO/mitkDICOMPMIO.h b/Modules/DICOMPM/autoload/DICOMPMIO/mitkDICOMPMIO.h index 81245c97b3..46056c0d3e 100644 --- a/Modules/DICOMPM/autoload/DICOMPMIO/mitkDICOMPMIO.h +++ b/Modules/DICOMPM/autoload/DICOMPMIO/mitkDICOMPMIO.h @@ -1,69 +1,69 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef __mitkDICOMPMIO_h #define __mitkDICOMPMIO_h #include #include #include #include #include namespace mitk { /** * Read and Writes a Parametric map to a dcm file * @ingroup Process */ class DICOMPMIO : public mitk::AbstractFileIO { public: DICOMPMIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; protected: /** - * @brief Reads a DICOM parametric maps from the file system - * @return a mitk::Image - * @throws throws an mitk::Exception if an error ocurrs + * @brief Reads a DICOM parametric map from the file system + * @return an mitk::Image + * @throws an mitk::Exception if an error ocurrs */ - std::vector DoRead() override; + std::vector> DoRead() override; private: typedef mitk::Image PMInputType; typedef itk::Image PMitkInputImageType; typedef IODFloatingPointImagePixelModule::value_type PMFloatPixelType; // input type required for DCMQI typedef itk::Image PMitkInternalImageType; DICOMPMIO *IOClone() const override; // -------------- DICOMPMIO specific functions ------------- const std::string CreateMetaDataJsonFilePM() const; }; } // end of namespace mitk #endif // __mitkDICOMPMIO_h diff --git a/Modules/DICOMReader/include/mitkBaseDICOMReaderService.h b/Modules/DICOMReader/include/mitkBaseDICOMReaderService.h index e626b7da5a..aa56718ad8 100644 --- a/Modules/DICOMReader/include/mitkBaseDICOMReaderService.h +++ b/Modules/DICOMReader/include/mitkBaseDICOMReaderService.h @@ -1,70 +1,70 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKBASEDICOMREADERSERVICE_H #define MITKBASEDICOMREADERSERVICE_H #include #include #include "MitkDICOMReaderExports.h" namespace mitk { /** Base class for service wrappers that make DICOMFileReader from the DICOMReader module usable. */ class MITKDICOMREADER_EXPORT BaseDICOMReaderService : public AbstractFileReader { public: BaseDICOMReaderService(const std::string& description); BaseDICOMReaderService(const mitk::CustomMimeType& customType, const std::string& description); using AbstractFileReader::Read; IFileReader::ConfidenceLevel GetConfidenceLevel() const override; protected: /** Uses this->GetRelevantFile() and this->GetReader to load the image. * data and puts it into base data instances-*/ - std::vector DoRead() override; + std::vector> DoRead() override; /** Returns the list of all DCM files that are in the same directory * like this->GetLocalFileName().*/ mitk::StringList GetDICOMFilesInSameDirectory() const; /** Returns the reader instance that should be used. The descission may be based * one the passed relevant file list.*/ virtual mitk::DICOMFileReader::Pointer GetReader(const mitk::StringList& relevantFiles) const = 0; void SetOnlyRegardOwnSeries(bool); bool GetOnlyRegardOwnSeries() const; private: /** Flags that constrols if the read() operation should only regard DICOM files of the same series if the specified GetLocalFileName() is a file. If it is a director, this flag has no impact (it is assumed false then). */ bool m_OnlyRegardOwnSeries = true; }; class IPropertyProvider; /** Helper function that generates a name string (e.g. for DataNode names) from the DICOM properties of the passed provider instance. If the instance is nullptr, or has no dicom properties DataNode::NO_NAME_VALUE() will be returned.*/ std::string MITKDICOMREADER_EXPORT GenerateNameFromDICOMProperties(const mitk::IPropertyProvider* provider); } #endif // MITKBASEDICOMREADERSERVICE_H diff --git a/Modules/DICOMReaderServices/src/mitkDICOMReaderServicesActivator.cpp b/Modules/DICOMReaderServices/src/mitkDICOMReaderServicesActivator.cpp index a3a810280f..8896d2b9a9 100644 --- a/Modules/DICOMReaderServices/src/mitkDICOMReaderServicesActivator.cpp +++ b/Modules/DICOMReaderServices/src/mitkDICOMReaderServicesActivator.cpp @@ -1,93 +1,93 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #include "mitkDICOMReaderServicesActivator.h" #include "mitkAutoSelectingDICOMReaderService.h" #include "mitkClassicDICOMSeriesReaderService.h" #include "mitkDICOMTagsOfInterestService.h" #include "mitkSimpleVolumeDICOMSeriesReaderService.h" #include "mitkCoreServices.h" #include "mitkPropertyPersistenceInfo.h" #include "mitkDICOMIOMetaInformationPropertyConstants.h" #include "mitkIPropertyPersistence.h" #include "mitkTemporoSpatialStringProperty.h" #include -void AddPropertyPersistence(const mitk::PropertyKeyPath& propPath, bool temperoSpatial = false) +void AddPropertyPersistence(const mitk::PropertyKeyPath& propPath, bool temporoSpatial = false) { mitk::CoreServicePointer persistenceService(mitk::CoreServices::GetPropertyPersistence()); mitk::PropertyPersistenceInfo::Pointer info = mitk::PropertyPersistenceInfo::New(); if (propPath.IsExplicit()) { std::string name = mitk::PropertyKeyPathToPropertyName(propPath); std::string key = name; std::replace(key.begin(), key.end(), '.', '_'); info->SetNameAndKey(name, key); } else { std::string key = mitk::PropertyKeyPathToPersistenceKeyRegEx(propPath); std::string keyTemplate = mitk::PropertyKeyPathToPersistenceKeyTemplate(propPath); std::string propRegEx = mitk::PropertyKeyPathToPropertyRegEx(propPath); std::string propTemplate = mitk::PropertyKeyPathToPersistenceNameTemplate(propPath); info->UseRegEx(propRegEx, propTemplate, key, keyTemplate); } - if (temperoSpatial) + if (temporoSpatial) { info->SetDeserializationFunction(mitk::PropertyPersistenceDeserialization::deserializeJSONToTemporoSpatialStringProperty); info->SetSerializationFunction(mitk::PropertyPersistenceSerialization::serializeTemporoSpatialStringPropertyToJSON); } persistenceService->AddInfo(info); } namespace mitk { void DICOMReaderServicesActivator::Load(us::ModuleContext* context) { m_AutoSelectingDICOMReader.reset(new AutoSelectingDICOMReaderService()); m_SimpleVolumeDICOMSeriesReader.reset(new SimpleVolumeDICOMSeriesReaderService()); m_DICOMTagsOfInterestService.reset(new DICOMTagsOfInterestService()); context->RegisterService(m_DICOMTagsOfInterestService.get()); DICOMTagPathMapType tagmap = GetDefaultDICOMTagsOfInterest(); for (auto tag : tagmap) { m_DICOMTagsOfInterestService->AddTagOfInterest(tag.first); } //add properties that should be persistent (if possible/supported by the writer) AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_3D_plus_t()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_CONFIGURATION()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_DCMTK()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_FILES(), true); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_GANTRY_TILT_CORRECTED()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_GDCM()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_IMPLEMENTATION_LEVEL()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_IMPLEMENTATION_LEVEL_STRING()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_PIXEL_SPACING_INTERPRETATION()); AddPropertyPersistence(mitk::DICOMIOMetaInformationPropertyConstants::READER_PIXEL_SPACING_INTERPRETATION_STRING()); } void DICOMReaderServicesActivator::Unload(us::ModuleContext*) { } } US_EXPORT_MODULE_ACTIVATOR(mitk::DICOMReaderServicesActivator) diff --git a/Modules/DicomRT/autoload/IO/mitkRTDoseReaderService.h b/Modules/DicomRT/autoload/IO/mitkRTDoseReaderService.h index 78ffd50c10..ad24fd6011 100644 --- a/Modules/DicomRT/autoload/IO/mitkRTDoseReaderService.h +++ b/Modules/DicomRT/autoload/IO/mitkRTDoseReaderService.h @@ -1,66 +1,66 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef mitkRTDoseReaderService_h #define mitkRTDoseReaderService_h #include #include #include #include namespace mitk { /** * \brief RTDoseReaderService reads DICOM files of modality RTDOSE. */ class MITKDICOMRTIO_EXPORT RTDoseReaderService : public mitk::AbstractFileReader { public: RTDoseReaderService(const RTDoseReaderService& other); RTDoseReaderService(); ~RTDoseReaderService() override; using AbstractFileReader::Read; protected: /** * @brief Reads a dicom dataset from a RTDOSE file * The method reads the PixelData from the DicomRT dose file and scales * them with a factor for getting Gray-values instead of pixel-values. * The Gray-values are stored in a mitkImage with a vtkColorTransferFunc. * Relative values are used for coloring the image. The relative values are * relative to a PrescriptionDose defined in the RT-Plan. If there is no * RT-Plan file PrescriptionDose is set to 80% of the maximum dose. */ - std::vector DoRead() override; + std::vector> DoRead() override; private: RTDoseReaderService* Clone() const override; /** * \brief Scales an image with a factor * * \param gridscale the factor to scale with */ template void MultiplyGridScaling(itk::Image< TPixel, VImageDimension>* image, float gridscale); mitk::Image::Pointer scaledDoseImage; us::ServiceRegistration m_FileReaderServiceReg; }; } #endif diff --git a/Modules/DicomRT/autoload/IO/mitkRTPlanReaderService.h b/Modules/DicomRT/autoload/IO/mitkRTPlanReaderService.h index 593e55bb49..c2653f2991 100644 --- a/Modules/DicomRT/autoload/IO/mitkRTPlanReaderService.h +++ b/Modules/DicomRT/autoload/IO/mitkRTPlanReaderService.h @@ -1,63 +1,63 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef mitkRTPlanReaderService_h #define mitkRTPlanReaderService_h #include "mitkAbstractFileReader.h" #include #include "mitkIDICOMTagsOfInterest.h" #include "mitkDICOMDatasetAccessingImageFrameInfo.h" #include #include "MitkDicomRTIOExports.h" namespace mitk { /** * \brief RTPlanReaderService reads DICOM files of modality RTPLAN. \details The tags are defined in mitk::GetDefaultDICOMTagsOfInterest() in Module MitkDicomReader. They are stored as TemporoSpatialStringProperty. with the key as their respective DICOM tags. \note No image information is in RTPLAN. */ class MITKDICOMRTIO_EXPORT RTPlanReaderService : public mitk::AbstractFileReader { public: RTPlanReaderService(); RTPlanReaderService(const RTPlanReaderService& other); using AbstractFileReader::Read; ~RTPlanReaderService() override; protected: /** * \brief Reads the file (only tags). @details DICOMDCMTKTagScanner is used to read the tags \note No image information is in RTPLAN. \sa mitk::GetDefaultDICOMTagsOfInterest() for tags that are read */ - std::vector DoRead() override; + std::vector> DoRead() override; private: RTPlanReaderService* Clone() const override; us::ServiceRegistration m_FileReaderServiceReg; }; } #endif diff --git a/Modules/DicomRT/autoload/IO/mitkRTStructureSetReaderService.h b/Modules/DicomRT/autoload/IO/mitkRTStructureSetReaderService.h index 05fc2870b3..8fcf2e8efb 100644 --- a/Modules/DicomRT/autoload/IO/mitkRTStructureSetReaderService.h +++ b/Modules/DicomRT/autoload/IO/mitkRTStructureSetReaderService.h @@ -1,87 +1,87 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKRTSTRUCTURESETREADER_H #define MITKRTSTRUCTURESETREADER_H #include #include "MitkDicomRTIOExports.h" #include #include namespace mitk { class MITKDICOMRTIO_EXPORT RTStructureSetReaderService : public mitk::AbstractFileReader { /** * Represent a region of interest (ROI) */ class RoiEntry { public: RoiEntry(); RoiEntry(const RoiEntry& src); virtual ~RoiEntry(); RoiEntry& operator=(const RoiEntry& src); void SetPolyData(ContourModelSet::Pointer roiPolyData); unsigned int Number; std::string Name; std::string Description; double DisplayColor[3]; mitk::ContourModelSet::Pointer ContourModelSet; }; public: RTStructureSetReaderService(); RTStructureSetReaderService(const RTStructureSetReaderService& other); ~RTStructureSetReaderService() override; /** * @brief Reading a RT StructureSet from the DICOM file and returns the ROIs * (region of interest) as a ContourModelSet. One ContourModelSet represent * one ROI. A ContourModelSet contains ContourModels which represent the * single structures. */ using AbstractFileReader::Read; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: RTStructureSetReaderService* Clone() const override; /** * containing the ROIs meta information like name number and description */ std::vector ROISequenceVector; /** * Returns the number of ROIs from the ROISequenceVector */ size_t GetNumberOfROIs() const; /** * Returns the relevant ROI from the ROISequenceVector by its number */ RoiEntry* FindRoiByNumber(unsigned int roiNum); us::ServiceRegistration m_FileReaderServiceReg; }; } #endif // MITKRTSTRUCTURESETREADER_H diff --git a/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderCSV.h b/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderCSV.h index 944fefde13..462a6b4ca1 100644 --- a/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderCSV.h +++ b/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderCSV.h @@ -1,80 +1,80 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_ #define MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_ #include #include #include namespace mitk { /** This class reads csv logged navigation datas from the hard disc and returns * the navigation data set. * * Caution: at the moment only one navigation data is supported which means that only * the data of the first navigation tool in the file is read! */ class MITKIGTIO_EXPORT NavigationDataReaderCSV : public AbstractFileReader { public: NavigationDataReaderCSV(); ~NavigationDataReaderCSV() override; /** @return Returns the NavigationDataSet of the first tool in the given file. * Returns an empty NavigationDataSet if the file could not be read. */ using AbstractFileReader::Read; protected: - std::vector DoRead() override; + std::vector> DoRead() override; /** * /brief Creates a NavigationData Pointer based on the given Input. */ mitk::NavigationData::Pointer CreateNd(std::string timestamp, std::string valid, std::string X, std::string Y, std::string Z, std::string QX, std::string QY, std::string QZ, std::string QR); /** * /brief Presents File Content line by line */ std::vector GetFileContentLineByLine(std::string filename); /** * /brief Calculates the Number of Tools based on the number of colums per line. */ int getNumberOfToolsInLine(std::string line); /** * /brief Converts string to double returns zero if failing */ std::vector parseLine(std::string line, int NumOfTools); /** * /brief Converts string to double returns zero if failing */ double StringToDouble( const std::string& s ); /** * /brief Split line in elemens based on a given delim */ std::vector splitLine(std::string line); NavigationDataReaderCSV(const NavigationDataReaderCSV& other); mitk::NavigationDataReaderCSV* Clone() const override; }; } #endif // MITKNavigationDataReaderCSV_H_HEADER_INCLUDED_ diff --git a/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderXML.h b/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderXML.h index 9dba6a5e6e..8c6dc89b47 100644 --- a/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderXML.h +++ b/Modules/IGTBase/autoload/IO/mitkNavigationDataReaderXML.h @@ -1,106 +1,106 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef MITKNavigationDataReaderXML_H_HEADER_INCLUDED_ #define MITKNavigationDataReaderXML_H_HEADER_INCLUDED_ #include #include #include // includes for exceptions #include #include class TiXmlElement; class TiXmlNode; namespace mitk { class MITKIGTIO_EXPORT NavigationDataReaderXML : public AbstractFileReader { public: NavigationDataReaderXML(); ~NavigationDataReaderXML() override; using AbstractFileReader::Read; protected: - std::vector DoRead() override; + std::vector> DoRead() override; NavigationDataReaderXML(const NavigationDataReaderXML& other); mitk::NavigationDataReaderXML* Clone() const override; NavigationDataSet::Pointer ReadNavigationDataSet(); /** * \brief This method reads one line of the XML document and returns the data as a NavigationData object * If there is a new file version another method must be added which reads this data. * @throw mitk::IGTException Throws an exceptions if file is damaged. */ mitk::NavigationData::Pointer ReadVersion1(); mitk::NavigationData::Pointer ReadNavigationData(TiXmlElement* elem); std::string m_FileName; TiXmlElement* m_parentElement; TiXmlNode* m_currentNode; int m_FileVersion; ///< indicates which XML encoding is used int m_NumberOfOutputs; ///< stores the number of outputs known from the XML document // -- deprecated | begin //std::istream* m_Stream; ///< stores a pointer to the input stream bool m_StreamEnd; ///< stores if the input stream arrived at end bool m_StreamValid; ///< stores if the input stream is valid or not std::string m_ErrorMessage; ///< stores the error message if the stream is invalid /** * \brief Creates a stream out of the filename given by the variable m_FileName. * The stream is then set to m_Stream. * * @throw mitk::IGTIOException Throws an exception if file does not exist * @throw mitk::IGTException Throws an exception if the stream is nullptr */ //void CreateStreamFromFilename(); /** * \brief Returns the file version out of the XML document. * @throw mitk::IGTException Throws an mitk::IGTException an exception if stream is nullptr or not good. * @throw mitk::IGTIOException Throws an mitk::IGTIOException if the stream has an incompatible XML format. */ unsigned int GetFileVersion(std::istream* stream); /** * \brief Returns the number of tracked tools out of the XML document. * @throw Throws an exception if stream is nullptr. * @throw Throws an exception if the input stream has an XML incompatible format. */ unsigned int GetNumberOfNavigationDatas(std::istream* stream); /** * @brief This is a helping method which gives an error message and throws an exception with the given message. * It can be used if a stream is found to be invalid. * * @throw mitk::IGTIOException Always throws an exception. */ void StreamInvalid(std::string message); ///< help method which sets the stream invalid and displays an error // -- deprecated | end private: NavigationDataSet::Pointer Read(std::istream* stream); NavigationDataSet::Pointer Read(std::string fileName); }; } // namespace mitk #endif // MITKNavigationDataReaderXML_H_HEADER_INCLUDED_ diff --git a/Modules/IOExt/Internal/mitkObjFileReaderService.h b/Modules/IOExt/Internal/mitkObjFileReaderService.h index 517cf1004d..7a3f3919b2 100644 --- a/Modules/IOExt/Internal/mitkObjFileReaderService.h +++ b/Modules/IOExt/Internal/mitkObjFileReaderService.h @@ -1,47 +1,47 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef ObjFileReaderService_h #define ObjFileReaderService_h #include #include namespace mitk { class BaseData; /** * @brief Used to read surfaces from Wavefront OBJ files. * * @ingroup IOExt */ class ObjFileReaderService : public AbstractFileReader { public: ObjFileReaderService(); ~ObjFileReaderService() override; using AbstractFileReader::Read; static mitk::CustomMimeType mimeType; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: ObjFileReaderService *Clone() const override; }; } // namespace mitk #endif /* ObjFileReaderService_h */ diff --git a/Modules/IOExt/Internal/mitkPlyFileReaderService.h b/Modules/IOExt/Internal/mitkPlyFileReaderService.h index 8a64d4b476..52c1d6b19e 100644 --- a/Modules/IOExt/Internal/mitkPlyFileReaderService.h +++ b/Modules/IOExt/Internal/mitkPlyFileReaderService.h @@ -1,49 +1,49 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef PlyFileReaderService_h #define PlyFileReaderService_h #include #include namespace mitk { class BaseData; /** * @brief Used to read surfaces from the PLY format. * * This reader can read binary and ASCII versions of the format transparently. * * @ingroup IOExt */ class PlyFileReaderService : public AbstractFileReader { public: PlyFileReaderService(); ~PlyFileReaderService() override; using AbstractFileReader::Read; static mitk::CustomMimeType mimeType; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: PlyFileReaderService *Clone() const override; }; } // namespace mitk #endif /* PlyFileReaderService_h */ diff --git a/Modules/IOExt/Internal/mitkSceneFileReader.h b/Modules/IOExt/Internal/mitkSceneFileReader.h index 3ad622320d..efdc7c2f28 100644 --- a/Modules/IOExt/Internal/mitkSceneFileReader.h +++ b/Modules/IOExt/Internal/mitkSceneFileReader.h @@ -1,38 +1,38 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef SceneFileReader_H_HEADER_INCLUDED #define SceneFileReader_H_HEADER_INCLUDED // MITK #include namespace mitk { class SceneFileReader : public mitk::AbstractFileReader { public: SceneFileReader(); using AbstractFileReader::Read; DataStorage::SetOfObjects::Pointer Read(DataStorage &ds) override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: SceneFileReader *Clone() const override; }; } // namespace mitk #endif /* SceneFileReader_H_HEADER_INCLUDED_C1E7E521 */ diff --git a/Modules/IOExt/Internal/mitkVtkUnstructuredGridReader.h b/Modules/IOExt/Internal/mitkVtkUnstructuredGridReader.h index eec3bfec06..122a715556 100644 --- a/Modules/IOExt/Internal/mitkVtkUnstructuredGridReader.h +++ b/Modules/IOExt/Internal/mitkVtkUnstructuredGridReader.h @@ -1,37 +1,37 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef VtkUnstructuredGridReader_H_HEADER_INCLUDED #define VtkUnstructuredGridReader_H_HEADER_INCLUDED #include namespace mitk { //##Documentation //## @brief Reader to read unstructured grid files in vtk-format class VtkUnstructuredGridReader : public AbstractFileReader { public: VtkUnstructuredGridReader(); ~VtkUnstructuredGridReader() override; using AbstractFileReader::Read; protected: - std::vector DoRead() override; + std::vector> DoRead() override; VtkUnstructuredGridReader *Clone() const override; }; } // namespace mitk #endif /* VtkUnstructuredGridReader_H_HEADER_INCLUDED */ diff --git a/Modules/IpPicSupportIO/Internal/mitkPicFileReader.h b/Modules/IpPicSupportIO/Internal/mitkPicFileReader.h index d299472e92..f472490732 100644 --- a/Modules/IpPicSupportIO/Internal/mitkPicFileReader.h +++ b/Modules/IpPicSupportIO/Internal/mitkPicFileReader.h @@ -1,48 +1,48 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef PICFILEREADER_H_HEADER_INCLUDED_C1F48A22 #define PICFILEREADER_H_HEADER_INCLUDED_C1F48A22 #include "mitkAbstractFileReader.h" #include "mitkImage.h" #include "mitkIpPic.h" namespace mitk { //##Documentation //## @brief Reader to read files in DKFZ-pic-format class PicFileReader : public AbstractFileReader { public: PicFileReader(); using AbstractFileReader::Read; protected: void FillImage(Image::Pointer image); Image::Pointer CreateImage(); - std::vector DoRead() override; + std::vector> DoRead() override; private: static void ConvertHandedness(mitkIpPicDescriptor *pic); PicFileReader *Clone() const override; }; } // namespace mitk #endif /* PICFILEREADER_H_HEADER_INCLUDED_C1F48A22 */ diff --git a/Modules/MatchPointRegistration/autoload/IO/mitkMAPRegistrationWrapperIO.h b/Modules/MatchPointRegistration/autoload/IO/mitkMAPRegistrationWrapperIO.h index c7dac932e5..cf3042e9ed 100644 --- a/Modules/MatchPointRegistration/autoload/IO/mitkMAPRegistrationWrapperIO.h +++ b/Modules/MatchPointRegistration/autoload/IO/mitkMAPRegistrationWrapperIO.h @@ -1,51 +1,51 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_MAP_REGISTRATION_WRAPPER_IO_H #define _MITK_MAP_REGISTRATION_WRAPPER_IO_H #include #include "MitkMatchPointRegistrationExports.h" namespace mitk { /** * Offers IO capability for MatchPoint registration wrappers */ class MAPRegistrationWrapperIO : public AbstractFileIO { public: MAPRegistrationWrapperIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: MAPRegistrationWrapperIO(const MAPRegistrationWrapperIO& other); MAPRegistrationWrapperIO* IOClone() const override; }; } // end of namespace mitk #endif diff --git a/Modules/Multilabel/autoload/DICOMSegIO/mitkDICOMSegmentationIO.h b/Modules/Multilabel/autoload/DICOMSegIO/mitkDICOMSegmentationIO.h index 71ef45b36e..123bcb803c 100644 --- a/Modules/Multilabel/autoload/DICOMSegIO/mitkDICOMSegmentationIO.h +++ b/Modules/Multilabel/autoload/DICOMSegIO/mitkDICOMSegmentationIO.h @@ -1,64 +1,64 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef __mitkDICOMSegmentationIO_h #define __mitkDICOMSegmentationIO_h #include #include #include namespace mitk { /** * Read and Writes a LabelSetImage to a dcm file * @ingroup Process */ class DICOMSegmentationIO : public mitk::AbstractFileIO { public: typedef mitk::LabelSetImage InputType; typedef itk::Image itkInputImageType; typedef itk::Image itkInternalImageType; DICOMSegmentationIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; protected: /** * @brief Reads a number of DICOM segmentation from the file system * @return a vector of mitk::LabelSetImages * @throws throws an mitk::Exception if an error ocurrs */ - std::vector DoRead() override; + std::vector> DoRead() override; private: DICOMSegmentationIO *IOClone() const override; // -------------- DICOMSegmentationIO specific functions ------------- const std::string CreateMetaDataJsonFile(int layer); void SetLabelProperties(Label *label, dcmqi::SegmentAttributes *segmentAttribute); void AddDICOMTagsToService(); }; } // end of namespace mitk #endif // __mitkDICOMSegmentationIO_h diff --git a/Modules/Multilabel/autoload/IO/mitkLabelSetImageIO.h b/Modules/Multilabel/autoload/IO/mitkLabelSetImageIO.h index 4e2ac697fe..4b079dc5e4 100644 --- a/Modules/Multilabel/autoload/IO/mitkLabelSetImageIO.h +++ b/Modules/Multilabel/autoload/IO/mitkLabelSetImageIO.h @@ -1,68 +1,68 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef __mitkLabelSetImageIO_h #define __mitkLabelSetImageIO_h #include #include namespace mitk { /** * Writes a LabelSetImage to a file * @ingroup Process */ // The export macro should be removed. Currently, the unit // tests directly instantiate this class. class LabelSetImageIO : public mitk::AbstractFileIO { public: typedef mitk::LabelSetImage InputType; LabelSetImageIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; // -------------- LabelSetImageIO specific functions ------------- int GetIntByKey(const itk::MetaDataDictionary &dic, const std::string &str); std::string GetStringByKey(const itk::MetaDataDictionary &dic, const std::string &str); protected: /** * @brief Reads a number of mitk::LabelSetImages from the file system * @return a vector of mitk::LabelSetImages * @throws throws an mitk::Exception if an error ocurrs during parsing the nrrd header */ - std::vector DoRead() override; + std::vector> DoRead() override; // Fills the m_DefaultMetaDataKeys vector with default values virtual void InitializeDefaultMetaDataKeys(); private: LabelSetImageIO *IOClone() const override; std::vector m_DefaultMetaDataKeys; }; } // end of namespace mitk #endif // __mitkLabelSetImageIO_h diff --git a/Modules/TubeGraph/include/mitkTubeGraphIO.h b/Modules/TubeGraph/include/mitkTubeGraphIO.h index 5406974c3e..b4a0b0afea 100644 --- a/Modules/TubeGraph/include/mitkTubeGraphIO.h +++ b/Modules/TubeGraph/include/mitkTubeGraphIO.h @@ -1,71 +1,71 @@ /*============================================================================ The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center (DKFZ) All rights reserved. Use of this source code is governed by a 3-clause BSD license that can be found in the LICENSE file. ============================================================================*/ #ifndef _MITK_TUBE_GRAPH_IO_H_ #define _MITK_TUBE_GRAPH_IO_H_ #include #include #include #include "mitkTubeGraph.h" class TiXmlElement; namespace mitk { /** * @brief reader and writer for xml representations of mitk::TubeGraph * * @ingroup IO */ class TubeGraphIO : public mitk::AbstractFileIO { public: TubeGraphIO(); // -------------- AbstractFileReader ------------- using AbstractFileReader::Read; ConfidenceLevel GetReaderConfidenceLevel() const override; // -------------- AbstractFileWriter ------------- void Write() override; ConfidenceLevel GetWriterConfidenceLevel() const override; static CustomMimeType TUBEGRAPH_MIMETYPE() // tsf { CustomMimeType mimeType(TUBEGRAPH_MIMETYPE_NAME()); mimeType.AddExtension("tsf"); mimeType.SetCategory("Graphs"); mimeType.SetComment("MITK Tube Graph Structure File"); return mimeType; } static std::string TUBEGRAPH_MIMETYPE_NAME() { static std::string name = mitk::IOMimeTypes::DEFAULT_BASE_NAME() + ".graphs.tubular-sructure"; return name; } protected: - std::vector DoRead() override; + std::vector> DoRead() override; private: TubeGraphIO *IOClone() const override; TubeGraphIO(const TubeGraphIO &other); const BoundingBox::Pointer ComputeBoundingBox(TubeGraph::Pointer graph) const; }; } #endif //_MITK_SURFACE_VTK_IO_H_