core/vil/file_formats/vil_dicom_stream.h
Go to the documentation of this file.
00001 #ifndef vil_dicom_stream_h_
00002 #define vil_dicom_stream_h_
00003 //:
00004 // \file
00005 // \author Amitha Perera
00006 
00007 #include <dcistrma.h>
00008 
00009 class vil_stream;
00010 
00011 class vil_dicom_stream_producer
00012   : public DcmProducer
00013 {
00014  public:
00015   vil_dicom_stream_producer( vil_stream* vs );
00016 
00017   virtual ~vil_dicom_stream_producer();
00018 
00019   virtual OFBool good() const;
00020   virtual OFCondition status() const;
00021   virtual OFBool eos() const;
00022   virtual Uint32 avail() const;
00023   virtual Uint32 read(void *buf, Uint32 buflen);
00024   virtual Uint32 skip(Uint32 skiplen);
00025   virtual void putback(Uint32 num);
00026 
00027  private:
00028   vil_stream* vs_;
00029 };
00030 
00031 
00032 class vil_dicom_stream_factory
00033   : public DcmInputStreamFactory
00034 {
00035  public:
00036   vil_dicom_stream_factory( vil_stream* vs );
00037 
00038   virtual ~vil_dicom_stream_factory();
00039 
00040   virtual DcmInputStream* create() const;
00041 
00042   virtual DcmInputStreamFactory* clone() const
00043   {
00044     return new vil_dicom_stream_factory(*this);
00045   }
00046 
00047  private:
00048   vil_stream* vs_;
00049 };
00050 
00051 class vil_dicom_stream_input
00052   : public DcmInputStream
00053 {
00054  public:
00055   vil_dicom_stream_input( vil_stream* vs );
00056   virtual ~vil_dicom_stream_input();
00057   virtual DcmInputStreamFactory* newFactory() const;
00058 };
00059 
00060 #endif // vil_dicom_stream_h_