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 : Thursday, August 20, 2009 11:06:36 PM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


Hello..

Thanks..
Now i want convert Dicom file to jpeg file can u geme steps to do it in c++



Thanks.
 

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 : Thursday, August 20, 2009 11:13:01 PM(UTC)

uk15  
uk15

Groups: Registered
Posts: 40


Hi....


About above post ...............
/**************CODE*******************/

if(LBase::LoadLibraries(LT_FIL)& LT_FIL)
{
///return -1;

}


nRet = pDS->LoadDS(TEXT("C:\\Program Files\\Foresight\\TIMS\\Studies\\999-123-9991_PX_11-14-2003_170241\\999-123-9991_PX_11-14-2003_170241_0001.DCM"), 0);
if(nRet != DICOM_SUCCESS)
i++;
pElement = pDS->FindFirstElement(NULL, TAG_PIXEL_DATA, FALSE);
if (pElement != NULL)
{
nRet = pDS->GetImage(pElement, &Bitmap, sizeof(BITMAPHANDLE), 0, 0, ORDER_BGR, DICOM_GETIMAGE_AUTO_APPLY_MODALITY_LUT|
DICOM_GETIMAGE_AUTO_APPLY_VOI_LUT, NULL, NULL);
if(nRet != DICOM_SUCCESS)
i=2;

BitmapBase.SetFileName(TEXT("e:\\Image1.jpg"));
nRet = BitmapBase.SetHandle(&Bitmap,true);
if(nRet != SUCCESS)
i=4;
nRet = BitmapBase.Save("e:\\Image1.jpg",FILE_JPEG, 12, ABCQ_LOSSLESS, NULL);
if(nRet != DICOM_SUCCESS)
i=2;

/*************************************/

i have done code like this by this file get generated but .... we cant see image in that jpeg....

Can u please help me..........

Thanks..
 
#3 Posted : Sunday, August 23, 2009 5:07:58 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,022

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

The value of ABCQ_LOSSLESS should not be used with JPEG because it's meant for ABC compression.

However, that value is 0 (zero), which works with JPEG and means Lossless JPEG. If you are saving a lossless JPEG 12-bit grayscale image, it could be a valid image but not many applications will be able to load it because that format is not a common one.

Did you try to open the file using LEADTOOLS?
 
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-2024, Yet Another Forum.NET
This page was generated in 0.058 seconds.