DicomIO.h 833 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _DicomIO_h_
  2. #define _DicomIO_h_
  3. #include "../Pattern/Singleton.h"
  4. #include "../Container/ExtendedImage.h"
  5. #include "../Container/Video.h"
  6. class DcmDataset;
  7. class DicomIO : public Singleton< DicomIO >
  8. {
  9. public:
  10. enum DicomIOType
  11. {
  12. DicomIOUnknown = 0,
  13. DicomIOUnmanaged,
  14. DicomIOImage,
  15. DicomIOMultiFrame
  16. };
  17. DicomIOType getType( std::string fileName );
  18. bool read( std::string fileName, ExtendedImage& image );
  19. bool write( std::string fileName, ExtendedImage& image );
  20. bool read( std::string fileName, Video& image );
  21. bool HasCalibration();
  22. protected:
  23. DicomIO();
  24. virtual ~DicomIO();
  25. friend class Singleton< DicomIO >;
  26. bool readResolutions( DcmDataset* dataset, double& sizeX, double& sizeY );
  27. bool m_calibrated;
  28. std::string m_manufacturer;
  29. };
  30. #endif