Closed Dash-Uttam closed 2 years ago
but in your code you are iterating the bitmap frames and for every frame you are creating a full dataset, store this dataset and send it to the pacs. So you are handling every frame like a new separate dicomfile. if you want to have one dicomfile with multiple frames, then the only part that you have to loop through is the
[...]
DicomPixelData pixelData = DicomPixelData.Create(ds, true);
pixelData.BitsStored = 8;
pixelData.SamplesPerPixel = 3;
pixelData.HighBit = 7;
pixelData.PixelRepresentation = 0;
pixelData.PlanarConfiguration = 0;
foreach (Bitmap item in videoFrames)
{
Bitmap bitmap = new Bitmap(item);
//bitmap = GetValidImage(bitmap);
byte[] pixels = GetPixels(bitmap);
MemoryByteBuffer buffer = new MemoryByteBuffer(pixels);
pixelData.AddFrame(buffer);
}
[...]
@gofal Thanks for help. If you have full code or any reference some where, So that i can manage my code accordingly. Thanks in advance.
Hello All,
I am trying to create dicom file from video. In that i loop through the video frame in bitmap item after i am uploading the frame by frame in server, uploading is working correctly but when i am trying to save dicom file in my local i am getting only last frame dcm file. i want all the frames in single dcm file. i am attaching my code here.
@gofal Please if you can help me in that. thank you in advance.