Ejemplo n.º 1
0
 public FileFormat(bool hasPreamble, bool hasFileMetaInfo, DcmDecodeParam decodeParam)
 {
     if (hasPreamble && !hasFileMetaInfo) {
         throw new ArgumentException("Preamble without FMI");
     }
     this.hasPreamble = hasPreamble;
     this.hasFileMetaInfo = hasFileMetaInfo;
     this.decodeParam = decodeParam;
 }
Ejemplo n.º 2
0
 public override void readDataset(System.IO.Stream in_Renamed, DcmDecodeParam param, int stopTag)
 {
     throw new UnsupportedOperationException();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Test if this is Implicit ValueRepresentation format
 /// </summary>
 /// <param name="decodeParam"></param>
 /// <returns></returns>
 private int TestIVRFormat(DcmDecodeParam decodeParam)
 {
     DcmDecodeParam = decodeParam;
     ParseHeader();
     if (rVR != VRs.UN && rLen <= 64) {
         if (rTag >= 0x00050000) // Should be 0x00080000
         {
             return 1;
         }
         if ((rTag >> 16) == 2) {
             return 0;
         }
     }
     return -1;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Test if this is Explicit ValueRepresentation format
 /// </summary>
 /// <param name="decodeParam"></param>
 /// <returns></returns>
 private int TestEVRFormat(DcmDecodeParam decodeParam)
 {
     DcmDecodeParam = decodeParam;
     ParseHeader();
     if (rVR == VRs.GetVR(rTag)) {
         if ((rTag >> 16) == 2) {
             return 0;
         }
         if (rTag >= 0x00080000) {
             return 1;
         }
     }
     return -1;
 }
Ejemplo n.º 5
0
        public long ParseFileMetaInfo(bool preamble, DcmDecodeParam param)
        {
            rPos = 0L;
            byte[] data = preamble ? ParsePreamble() : null;
            if (handler != null) {
                handler.StartFileMetaInfo(data);
            }

            DcmDecodeParam = param;
            ParseGroup(2);
            if (handler != null) {
                handler.EndFileMetaInfo();
            }
            return rPos;
        }
Ejemplo n.º 6
0
 public long ParseDataset(DcmDecodeParam param, uint stopTag)
 {
     DcmDecodeParam = param;
     if (handler != null) {
         handler.StartDataSet();
         handler.DcmDecodeParam = decodeParam;
     }
     long read = DoParse(stopTag, -1);
     if (handler != null) {
         handler.EndDataSet();
     }
     return read;
 }
Ejemplo n.º 7
0
 public virtual void ReadDataset(Stream ins, DcmDecodeParam param, uint stopTag)
 {
     var Parser = new DcmParser(ins);
     Parser.DcmHandler = DcmHandler;
     Parser.ParseDataset(param, stopTag);
 }