convert any JPG or BMP to DCM Format

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

convert any JPG or BMP to DCM Format

#1 Post by ziashahid »

Hello ALL!

Can anyone help me out to convert an JPG or BMP to DCM format provided the JPG or BMP file is made by converting a DCM file.

I just wanna know how stat the code , i havn't got any idea, i am trying my level best to do this. For that , i desperately looking for help from u all.

Thanks


Regards
ZIA

Jörg Riesmeier
ICSMED DICOM Services
ICSMED DICOM Services
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier »

See FAQ #34.

ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

#3 Post by ziashahid »

Jörg Riesmeier wrote:See FAQ #34.


Dear Jörg !

many many thanks for ur response.

But in this FAQ #34 , u did not specified that how to read JPG image attributes like width, height, bits stored, pixel representation etc.

i haven't find any function related to this in DCMTK toolkit, so plz if u have any idea regarding this mail me.



Regards
Zia

Marco Eichelberg
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 1437
Joined: Tue, 2004-11-02, 17:22
Location: Oldenburg, Germany
Contact:

#4 Post by Marco Eichelberg »

DCMTK does not provide methods for decoding image formats other than DICOM. You need to use an appropriate toolkit to do this (or develop it by yourself). In the case of JPEG, the Independent JPEG Group (IJG) toolkit is an obvious choice.

ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

#5 Post by ziashahid »

Marco Eichelberg wrote:DCMTK does not provide methods for decoding image formats other than DICOM. You need to use an appropriate toolkit to do this (or develop it by yourself). In the case of JPEG, the Independent JPEG Group (IJG) toolkit is an obvious choice.

Dear Marco Eichelberg,


Thanks for ur reply.


regards
Zia

Manish
Posts: 6
Joined: Mon, 2005-12-05, 06:53

#6 Post by Manish »

Hello Zia:

Did you find information about creation of DICOM image file from BMP, JPEG or any other format

Regard,
Manish

ziashahid
Posts: 27
Joined: Thu, 2005-06-30, 07:54

#7 Post by ziashahid »

dear manish!


I have found a way to convert the JPG Image to DICOM Image by using LIBJPEG rev9.0 lib freely available on the net , i just modify its function which is converting any BMP file to JPG and find it working successfully for dicom image. And one more after having Image data from the JPG file u have to enter DICOM tags related to ur Image.


So, try to do it and in case of any problem , feel free to ask me.


Bye and take care


Zia

Manish
Posts: 6
Joined: Mon, 2005-12-05, 06:53

#8 Post by Manish »

Hello Zia:

hanks for the information. I was able to modify my code and it works correctly for BMP image. However, I had problems loading image(I/O Error) in ezDicom (a Dicom viewer) when I use attribute DCM_PatientsName. The loading is correct in case of ImageJ (another Docim viewer).

My concern is that I am creating a DICOMDIR and it uses DCM_PatientsName attribute (althought for DICOMDIR this attribute is of Type 2). If I don't use this attribute I am not able to create DICOMDIR.

I need good information about DICOM dir. Do you have any idea where can I get some relevant documentation.

Thanks and Best Regards,
Manish

Post Reply

Who is online

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