DicomIO.h 876 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. };
  29. #endif