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; }
public override void readDataset(System.IO.Stream in_Renamed, DcmDecodeParam param, int stopTag) { throw new UnsupportedOperationException(); }
/// <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; }
/// <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; }
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; }
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; }
public virtual void ReadDataset(Stream ins, DcmDecodeParam param, uint stopTag) { var Parser = new DcmParser(ins); Parser.DcmHandler = DcmHandler; Parser.ParseDataset(param, stopTag); }