#ifndef DICOM_H
#define DICOM_H
#include <iostream>

enum VR_TYPE {AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB,
			  OW, PN, SH, SL, SQ, SS, ST, TM, UI, UL, UN, US, UT,
			  USS, OBW, RET, ERROR,
			  IMPLICIT, UNKNOWN};

struct DICOM_TAG
{
  unsigned short group;
  unsigned short element;
  enum VR_TYPE vr;
  char mv;
  char *name;
  void set_name();
  void set_implicit_type();
  const char * vrAsString();
};


class Element
{
 public:
  DICOM_TAG tag;
  char vr[2];
  VR_TYPE vr_type;
  unsigned int value_length;
  unsigned char  *value;

  VR_TYPE vr2type();
  
public:
  Element();
  ~Element();
  bool read (istream &is);
  void print(ostream &os);
};


#endif