public Dcm2Bmp(DicomDataset dataset) { _dcmDataset = dataset; _pixelData = null; _width = _dcmDataset[DicomTags.Columns].GetInt32(0, 512); _height = _dcmDataset[DicomTags.Rows].GetInt32(0, 512); _compressionMode = COMPRESSION_MODE.COMPRESS_NONE; _photometric = _dcmDataset[DicomTags.PhotometricInterpretation].ToString(); _bitsAllocated = _dcmDataset[DicomTags.BitsAllocated].GetInt32(0, 8); _samplesPerPixel = _dcmDataset[DicomTags.SamplesPerPixel].GetInt32(0, 1); _bitsPerPixel = _bitsAllocated * _samplesPerPixel; _bitmap = new Bitmap(_width, _height); }
public Dcm2Bmp() { _dcmDataset = null; _pixelData = null; _width = 0; _height = 0; _compressionMode = COMPRESSION_MODE.COMPRESS_NONE; _photometric = null; _bitsAllocated = 0; _bitsStored = 0; _samplesPerPixel = 0; _bitsPerPixel = 0; _bitmap = null; _highBit = 0; _pixelRepresentation = 0; _winWidth = 0; _winCenter = 0; }
public Dcm2Bmp(byte[] pixelData, int width, int height, string photometric, int bitsAllocated, int bitsStored, int samplesPerPixel, int highBit, int pixelRepresentation, float winWidth, float winCenter) { _dcmDataset = null; _pixelData = pixelData; _width = width; _height = height; _compressionMode = COMPRESSION_MODE.COMPRESS_NONE; _photometric = photometric; _bitsAllocated = bitsAllocated; _bitsStored = bitsStored; _samplesPerPixel = samplesPerPixel; _bitsPerPixel = _bitsAllocated * _samplesPerPixel; _bitmap = new Bitmap(_width, _height); _highBit = highBit; _pixelRepresentation = pixelRepresentation; _winWidth = winWidth; _winCenter = winCenter; }