/// <summary>
        /// Replace a specific uncompressed frame.
        /// </summary>
        /// <param name="frame">The zero-offset index of the frame to be replaced.</param>
        /// <param name="frameData">Frame data to replace the current data</param>
        /// <returns>A byte array containing the frame data.</returns>
        /// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="frame"/> specifies an invalid frame index.</exception>
        /// <exception cref="DicomDataException">Thrown if there was a problem extracting the specified frame from the pixel data buffer.</exception>
        public void SetFrame(int frame, byte[] frameData)
        {
            if (frame >= NumberOfFrames || frame < 0)
            {
                throw new ArgumentOutOfRangeException("frame");
            }

            if (frame >= _fd.Count)
            {
                throw new DicomDataException("Requested frame exceeds available pixel data in buffer.");
            }

            _fd[frame] = new FrameDataBytes(this, frameData);
        }
		/// <summary>
		/// Replace a specific uncompressed frame.
		/// </summary>
		/// <param name="frame">The zero-offset index of the frame to be replaced.</param>
		/// <param name="frameData">Frame data to replace the current data</param>
		/// <returns>A byte array containing the frame data.</returns>
		/// <exception cref="ArgumentOutOfRangeException">Thrown if <paramref name="frame"/> specifies an invalid frame index.</exception>
		/// <exception cref="DicomDataException">Thrown if there was a problem extracting the specified frame from the pixel data buffer.</exception>
		public void SetFrame(int frame, byte[] frameData)
		{
			if (frame >= NumberOfFrames || frame < 0)
				throw new ArgumentOutOfRangeException("frame");

			if (frame >= _fd.Count)
				throw new DicomDataException("Requested frame exceeds available pixel data in buffer.");

			_fd[frame] = new FrameDataBytes(this, frameData);
		}