Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Wednesday, October 20, 2010 4:37:19 AM(UTC)
samit1984

Groups: Registered
Posts: 33


hello sir

please give me help related c++ class  library as i am writing code in c ++ 

 can u tell me how to convert jpeg to dicom

i Initialize the DICOM dataset by using

pDS = new LDicomDS(NULL);

pDS->InitDS(CLASS_XA_BIPLANE_IMAGE_STORAGE_RETIRED, DS_METAHEADER_PRESENT |DS_LITTLE_ENDIAN | DS_EXPLICIT_VR |DS_GROUP_LENGTHS |DS_LENGTH_EXPLICIT);

and then find the first element

 and when i use insert image of dicom data set i think there is some problem in bitmap my bitmap is not able to load on its own  can u tell me how to load bitmap

 i am using

LeadFile.SetFileName(TEXT("D:\\dicom\\hello\\new1")) ;

...........

...........

nRet=BitmapBase.Load(0,ORDER_BGR, NULL);

........................

nRet = pDS->InsertImage(pElement,&Bitmap, 1, IMAGE_COMPRESSION_NONE,IMAGE_PHOTOMETRIC_MONOCHROME1, 0, 2, DICOM_SETIMAGE_AUTO_SET_VOI_LUT, NULL, NULL);

so please tell me where i am missing

then i think i can use dicom dataset save to save it

please provide me with some sample code

thank u samit

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, October 20, 2010 5:38:35 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

I'm not I sure I understand the problem. Are you unable to load the JPEG image? If yes, you need to call the load method as follows:
LeadFile.SetFileName(.....)
nRet = LeadFile.Load(.....)

If you still face problems, please tell me what is the exact problem and which LEADTOOLS version (15, 16.5, 17, etc.) are you using?
 
#3 Posted : Wednesday, October 20, 2010 11:17:25 AM(UTC)
samit1984

Groups: Registered
Posts: 33


SIR I WANT TO CONVERT JPEG TO DICOM SO
I AM ABLE TO LOAD IMAGE AND
MY PROBLEM IS when I WANT TO CONVERT IT TO DICOM IMAGE SO

I AM TRYING TO INSERT THE LODED IMAGE(jpeg) TO DICOM DATA SET USING
1) LDicomDS::InsertImage(pElement, pBitmap, nIndex, nCompression, nPhotometric, nBitsPerPixel, nQFactor, uFlags, pfnCallback, pUserData)

pDICOMELEMENT pElement;
/* pointer to a DICOMELEMENT structure */

pBITMAPHANDLE pBitmap;
/* pointer to the bitmap handle */

befor using this function what i need to do . how do i update my pbitmap of dicom data set.
sir if u want i can send u my project
thanks samit
 
#4 Posted : Thursday, October 21, 2010 7:36:03 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

Samit,
Did you get the pixel data element before trying to insert the image (such as the LDicomDS::FindFirstElement). If yes, are you getting any errors trying to insert the pixel data?

Please create a small sample project (not your full application) and send it to me in a ZIP or RAR file. You can either post it here or send it to support@leadtools.com and mention this post.
When attaching to the forums, do not use the "Preview" feature.
 
#5 Posted : Friday, October 22, 2010 2:07:51 AM(UTC)
samit1984

Groups: Registered
Posts: 33


sir i have attach a code as a attachment

thank you

samit

File Attachment(s):
insert.txt (2kb) downloaded 21 time(s).
 
#6 Posted : Sunday, October 24, 2010 5:14:05 AM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

Samit,
You did not answer my questions:
1) Which LEADTOOLS version (15, 16.5, 17, etc.) are you using?
2) Did you get the pixel data element before trying to insert the image (Using LDicomDS::FindFirstElement)?
3) Did you face any errors? If yes, what is the exact error and which function is causing the error?
 
#7 Posted : Tuesday, January 4, 2011 10:11:28 PM(UTC)

Adam Boulad  
Guest

Groups: Guests
Posts: 3,028

Was thanked: 2 time(s) in 2 post(s)

More information regarding this issue:
InitDS will insert icon image sequence and under this sequence you will have a Pixel Data Element for icon. This is the reason why the insert function is failing. You need to search for the Pixel Data element as Tree to get the top level pixel data element as follows:
pElement = pDS->FindFirstElement(NULL, TAG_PIXEL_DATA, TRUE);

Also, passing the flags below to InitDS or SaveDS will slow down the processing, so I suggest that you don't use them:
DS_GROUP_LENGTHS, DS_LENGTH_EXPLICIT

 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.153 seconds.