예제 #1
0
 public DcmEncodeParam(ByteOrder byteOrder, bool explicitVR, bool deflated, bool encapsulated, bool skipGroupLen, bool undefSeqLen, bool undefItemLen)
     : base(byteOrder, explicitVR, deflated, encapsulated)
 {
     this.skipGroupLen = skipGroupLen;
     this.undefSeqLen = undefSeqLen;
     this.undefItemLen = undefItemLen;
 }
예제 #2
0
 public DcmDecodeParam(ByteOrder byteOrder, bool explicitVR, bool deflated, bool encapsulated)
 {
     if (byteOrder == null)
         throw new NullReferenceException();
     this.byteOrder = byteOrder;
     this.explicitVR = explicitVR;
     this.deflated = deflated;
     this.encapsulated = encapsulated;
 }
예제 #3
0
 public override ByteBuffer GetByteBuffer(ByteOrder byteOrder)
 {
     if (m_data.GetOrder() != byteOrder)
         SwapOrder();
     return (ByteBuffer) m_data.Rewind();
 }
예제 #4
0
 public virtual ByteBuffer GetDataFragment(int index, ByteOrder byteOrder)
 {
     throw new NotSupportedException(this.ToString());
 }
예제 #5
0
 internal static ByteOrder Swap(ByteOrder from)
 {
     return from == ByteOrder.LITTLE_ENDIAN ?
         ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN;
 }
예제 #6
0
 public ByteBuffer( int size, ByteOrder order )
     : base(size)
 {
     SetOrder( order );
 }
예제 #7
0
 public virtual ByteBuffer GetByteBuffer(ByteOrder byteOrder)
 {
     throw new NotSupportedException(this.ToString());
 }
예제 #8
0
 public ByteBuffer( byte[]buf, int offset, int size, ByteOrder order )
     : base(buf, offset, size)
 {
     SetOrder( order );
 }
예제 #9
0
 ///////////////////////////////////////////////////////////////////////
 /// Constructor
 ///////////////////////////////////////////////////////////////////////
 //private ByteBuffer( byte[] buf ) : this( buf, ByteOrder.LITTLE_ENDIAN )
 //{
 //}
 public ByteBuffer( byte[]buf, ByteOrder order )
     : base(buf)
 {
     SetOrder( order );
 }
예제 #10
0
        public ByteBuffer SetOrder( ByteOrder order )
        {
            this.order = order;

            // Both reader and writer work on the same back store: MemoryStream
            if( order == ByteOrder.LITTLE_ENDIAN )
            {
                reader = new BinaryReader( this );
                writer = new BinaryWriter( this );
            }
            else
            {
                reader = new BEBinaryReader( this );
                writer = new BEBinaryWriter( this );
            }
            return this;
        }
예제 #11
0
 public static ByteBuffer Wrap( byte[] buf, int offset, int len, ByteOrder order )
 {
     return new ByteBuffer( buf, offset, len, order  );
 }
예제 #12
0
 public static ByteBuffer Wrap( byte[] buf, ByteOrder order )
 {
     return new ByteBuffer( buf, order );
 }