DicomDataSet ds = new DicomDataSet();
byte[] compressedData = File.ReadAllBytes("image.raw");
var transferSyntax = TransferSyntaxes.JPEGLossless;
// add all relevant group 28 attributes to image to tell DicomObjects how to display
ds.Add(Keyword.SamplesPerPixel, 1);
ds.Add(Keyword.Rows, 512);
ds.Add(Keyword.Columns, 512);
ds.Add(Keyword.BitsAllocated, 8);
ds.Add(Keyword.BitsStored, 8);
ds.Add(Keyword.HighBit, 7);
ds.Add(Keyword.PixelRepresentation, 0); // PixelRepresentation 0=unsigned, 1=signed
ds.Add(Keyword.NumberOfFrames, 1);
ds.ImportPixelData(new List<byte[]> { compressedData }, transferSyntax);