Hi forks,
I am not the person who sent this question originally.
But I have a very simple and important problem.
So, I would appriciate it if someone answer my question.
I am tring to implement to apply PresentationLUT data from outside of the DICOM file to the DICOM image.
But I don't know how to make the PresentationLUT data with DcmUnsignedShort.
Once I tried to make DcmUnsignedShort data, as follows;
unsigned short *ee = new unsigned short[8];
ee[0]=0;
ee[1]=1;
ee[2]=2;
ee[3]=3;
ee[4]=4;
ee[5]=5;
ee[6]=6;
ee[7]=7;
DcmUnsignedShort *data;
data = (DcmUnsignedShort *)ee;
But the "data" which come as a consequence weren't the intended data.
Please tell me how to make the DcmUnsignedShort data from unsigned short data.
Thanks,
How to make presentationLUTData
Moderator: Moderator Team
-
- Posts: 40
- Joined: Thu, 2008-09-18, 09:20
- Location: Japan
-
- ICSMED DICOM Services
- Posts: 2217
- Joined: Fri, 2004-10-29, 21:38
- Location: Oldenburg, Germany
-
- Posts: 40
- Joined: Thu, 2008-09-18, 09:20
- Location: Japan
Hi Jörg,
Thank you for your help.
BTW, I tried to make the source code to put PresentationLut made by user into the DICOM image.
The sample program is as follows;
//PresentationLut
DcmUnsignedShort *presentationLUTDescriptor = new DcmUnsignedShort(DCM_LUTDescriptor);
DcmUnsignedShort *presentationLUTData = new DcmUnsignedShort(DCM_LUTData);
presentationLUTDescriptor->putUint16(1);
presentationLUTDescriptor->putUint16(1);
presentationLUTDescriptor->putUint16(16);
presentationLUTData->putUint16(1);
dcmimage->setPresentationLut(*presentationLUTData, *presentationLUTDescriptor);
Is this code OK?
If there is something wrong, please let me know.
Thanks,
Thank you for your help.
BTW, I tried to make the source code to put PresentationLut made by user into the DICOM image.
The sample program is as follows;
//PresentationLut
DcmUnsignedShort *presentationLUTDescriptor = new DcmUnsignedShort(DCM_LUTDescriptor);
DcmUnsignedShort *presentationLUTData = new DcmUnsignedShort(DCM_LUTData);
presentationLUTDescriptor->putUint16(1);
presentationLUTDescriptor->putUint16(1);
presentationLUTDescriptor->putUint16(16);
presentationLUTData->putUint16(1);
dcmimage->setPresentationLut(*presentationLUTData, *presentationLUTDescriptor);
Is this code OK?
If there is something wrong, please let me know.
Thanks,
Maty
-
- Posts: 40
- Joined: Thu, 2008-09-18, 09:20
- Location: Japan
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 1 guest