Exemplo n.º 1
0
            public override IByteBuffer GetFrame(int frame)
            {
                int offset = UncompressedFrameSize * frame;
                IByteBuffer buffer = new RangeByteBuffer(Element.Buffer, (uint)offset, (uint)UncompressedFrameSize);

                //TODO: trace down the need for this additional byte swap
                if (Syntax.Endian == Endian.Big && !Syntax.SwapPixelData)
                    buffer = new SwapByteBuffer(buffer, 2);

                // mainly for GE Private Implicit VR Little Endian
                if (Syntax.SwapPixelData)
                    buffer = new SwapByteBuffer(buffer, 2);

                return buffer;
            }
Exemplo n.º 2
0
            public override IByteBuffer GetFrame(int frame)
            {
                if (frame < 0 || frame >= NumberOfFrames) throw new IndexOutOfRangeException("Requested frame out of range!");

                int offset = UncompressedFrameSize * frame;
                IByteBuffer buffer = new RangeByteBuffer(Element.Buffer, (uint)offset, (uint)UncompressedFrameSize);

                // mainly for GE Private Implicit VR Big Endian
                if (Syntax.SwapPixelData) buffer = new SwapByteBuffer(buffer, 2);

                return buffer;
            }
Exemplo n.º 3
0
            public override IByteBuffer GetFrame(int frame)
            {
                if (frame < 0 || frame >= NumberOfFrames)
                    throw new IndexOutOfRangeException("Requested frame out of range!");

                int offset = UncompressedFrameSize * frame;
                IByteBuffer buffer = new RangeByteBuffer(Element.Buffer, (uint)offset, (uint)UncompressedFrameSize);

                //TODO: trace down the need for this additional byte swap
                if (Syntax.Endian == Endian.Big && !Syntax.SwapPixelData)
                    buffer = new SwapByteBuffer(buffer, 2);

                // mainly for GE Private Implicit VR Little Endian
                if (Syntax.SwapPixelData)
                    buffer = new SwapByteBuffer(buffer, 2);

                return buffer;
            }