jpg export

153 views
Skip to first unread message

Νικος Κα

unread,
Jun 26, 2016, 3:31:17 PM6/26/16
to Fellow Oak DICOM
Hello ,
i am trying to save an image 
My code is 
 var df = DicomFile.Open(path); 
DicomImage image = new DicomImage(df.Dataset);
Bitmap bmp = image.RenderImage(0).As<Bitmap>();
bmp.Save(testDir + instUid + @"\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);


i am receiving the following error:

(7fe0,0010) tag is empty.

 I have tryied 
df = df.ChangeTransferSyntax(DicomTransferSyntax.ExplicitVRLittleEndian) but without results
Any suggestion?


Anders Gustafsson Cureos AB

unread,
Jun 26, 2016, 3:41:49 PM6/26/16
to Fellow Oak DICOM
Hello Nikoc,

(7fe0,0010) is the Pixel Data tag. If that tag is not existing or does not contain any data, then there is no image included in the DICOM file. Please check the status of this tag in a DICOM viewer of your choice, and report back.

Regards,
Anders @ Cureos

Νικος Κα

unread,
Jun 26, 2016, 4:19:38 PM6/26/16
to Fellow Oak DICOM
I am using CStoreSCP example in order to transfer data from a server to a client.
It seems working. When i am trying to extract images from the received dcm files with the posted code i am receiving the error

An exception of type 'Dicom.DicomDataException' occurred in Dicom.Core.dll but was not handled in user code

Additional information: Tag: (7fe0,0010) not found in dataset

If there is a handler for this exception, the program may be safely continued.


Server LOG

par \cf1 26/6/2016 11:18:19 \f1\'ec\'ec ThreadID[1068] : Sending images to STORESCP started
\par \cf2\f0 *******************************************************
\par [1068]        >> : c-store request for Series C:\\KPacs\\Imagebox\\1.2.840.113619.2.38.992361096935.113219863584\\1.2.840.113619.2.38.992361096935.19970909174702485048 initiated.
\par \cf1 [1068]        >> : c-store request for PORTABLE, CHEST, Study: CHEST  Series: C:\\KPacs\\Imagebox\\1.2.840.113619.2.38.992361096935.113219863584\\1.2.840.113619.2.38.992361096935.19970909174702485048 successfull.
\par \cf2 *******************************************************
\par \cf1 26/6/2016 11:18:21 \f1\'ec\'ec ThreadID[1068] : Closed.
\par Task processed successfully
\par \cf2\f0 *******************************************************
\par \cf0 
\par }
sendfile.rar
receivedfile.rar

Anders Gustafsson Cureos AB

unread,
Jun 27, 2016, 1:06:31 AM6/27/16
to Fellow Oak DICOM
Taking a quick look at the files, it seems like the received file has been "cut off" at the section of private tags, (0023,xxxx). Not sure why that is, will take a closer look later on.
Reply all
Reply to author
Forward
0 new messages