Windows bitmap (HBITMAP) to DICOM Image.

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
anilta
Posts: 60
Joined: Thu, 2014-04-10, 08:50

Windows bitmap (HBITMAP) to DICOM Image.

#1 Post by anilta »

I am trying to convert a Pathology based Cell image to DICOM image and send to PACS.
I have an existing implementation, written in Delphi, which converts the Cell's pixel data into an TBitmap, which is nothing but an encapsulation of Window's HBITMAP.

So, how can i use HBITMAP object (memory pointer) to convert into a DICOM file ?

I cannot use DCMTK's img2dcm class based design, as this class requires a file name.
I can actually store HBITMAP object on disk as a file and use this file to convert to DICOM, like this,

Code: Select all

Image2Dcm i2d;
I2DImgSource *inputPlug = new I2DBmpSource();
I2DOutputPlug *outPlug = new I2DOutputPlugSC();
E_TransferSyntax writeXfer;
inputPlug->setImageFile("File.bmp");
DcmDataset *dataset = NULL;
OFCondition result = i2d.convert(inputPlug, outPlug, dataset, writeXfer);
But i do not want to do this because of performance issues (disk writes and deletes).

Is there any other helper classes (which i am not aware of) which can accept a BMP memory object and converts into a DICOM image ?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Windows bitmap (HBITMAP) to DICOM Image.

#2 Post by Michael Onken »

Hi,

no, right now there is no such class or method.

You could try to extend the existing img2dcm classes, e.g. add a related method to I2DBmpSource used by img2dcm to read from memory instead of a BMP file.

Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest