GDCM
2.2.3
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMIMAGEEXTENTREADER_H 00015 #define GDCMIMAGEEXTENTREADER_H 00016 00017 #include "gdcmImageReader.h" 00018 #include "gdcmImage.h" 00019 #include "gdcmRegion.h" 00020 00021 namespace gdcm 00022 { 00023 00024 class ImageRegionReaderInternals; 00029 class GDCM_EXPORT ImageRegionReader : public ImageReader 00030 { 00031 public: 00032 ImageRegionReader(); 00033 ~ImageRegionReader(); 00034 00036 void SetRegion(Region const & region); 00037 Region const &GetRegion() const; 00038 00042 size_t ComputeBufferLength() const; 00043 00046 bool ReadInformation(); 00047 00050 bool ReadIntoBuffer(char *inreadbuffer, size_t buflen); 00051 00052 protected: 00054 bool Read(); 00055 00056 private: 00057 bool ReadRAWIntoBuffer(char *buffer, size_t buflen); 00058 bool ReadRLEIntoBuffer(char *buffer, size_t buflen); 00059 bool ReadJPEG2000IntoBuffer(char *buffer, size_t buflen); 00060 bool ReadJPEGIntoBuffer(char *buffer, size_t buflen); 00061 bool ReadJPEGLSIntoBuffer(char *buffer, size_t buflen); 00062 ImageRegionReaderInternals *Internals; 00063 }; 00064 00065 } // end namespace gdcm 00066 00067 #endif //GDCMIMAGEEXTENTREADER_H