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 : Monday, May 12, 2008 12:37:02 AM(UTC)

majorss  
majorss

Groups: Registered
Posts: 7


/////////////////////////////////////////////////////////////////////////////<br>
1. How to implement <a href="http://www.leadtools.com/SDK/Image%20Processing/functions/Get%20Bitmap%20Statistics%20Information/">Get Bitmap Statistics Information</a> in V14.5.0.74(com) with VC++<br>
<br>
//<br>
pRast->GetRaster().SetRgnEllipse(l, t, r, b, L_RGN_SET); // or SetRgnRect(..........);<br>
int nMax = (1
//ILEADRasterProcess* pProc = NULL;<br>
pProc->GetBitmapStatisticsInfo(pRast->GetRaster(), CHANNEL_MASTER, 0, nMax);<br>
<br>
pRast->SetRgnFrameType(RGNFRAME_ANIMATED);<br>
pProc->GetRgnPerimeterLength(pRast->GetRaster());<br>
int nLength = pProc->GetRgnPerimeterLength();<br>
<br>
/*<br>
pProc->BitmapMean<br>
pProc->BitmapStandardDeviation<br>
pProc->BitmapMedian<br>
pProc->BitmapMinValue<br>
pProc->BitmapMaxValue<br>
pProc->BitmapPixelsCount<br>
pProc->BitmapSelectedPixelPercent<br>
*/<br>
<br>
<br>
<br>
/////////////////////////////////////////////////////////////////////////////<br>
2. How to save 16bits allocated, 12bit stored Dicom image from bitmap in V14.5.0.74(Classlib) with VC++?<br>
<br>
LBitmap & LDicomDS is not work.<br>
<br>
//<br>
LBitmap lBmp;<br>
int nRet = -1;<br>
<br>
#if FALSE<br>
nRet = lBmp.Load("d:\\ct_test_24.bmp", 12, ORDER_RGBORGRAY);<br>
#else<br>
nRet = lBmp.Load(_T("d:\\ct_test_24.bmp"), 0, ORDER_RGBORGRAY);<br>
nRet = lBmp.GrayScale(12);<br>
#endif<br>
<br>
pBITMAPHANDLE pHandle = lBmp.GetHandle();<br>
<br>
lBmp.SetFileName(_T("d:\\out_16A_12S.dcm"));<br>
nRet = lBmp.Save(FILE_DICOM_GRAY, // FILE_DICOM_GRAY, FILE_DICOM_COLOR<br>
12, // 16 ?<br>
FILE_RAW, // FILE_DICOM_GRAY, FILE_RAW, FILE_BMP<br>
1, //MULTIPAGE_OPERATION_OVERWRITE,<br>
NULL);<br>
<br>
LDicomDS ds;<br>
ds.InitDS(CLASS_CT_IMAGE_STORAGE,<br>
DS_METAHEADER_PRESENT | DS_LITTLE_ENDIAN | DS_EXPLICIT_VR | DS_GROUP_LENGTHS | DS_LENGTH_EXPLICIT | DS_KEEP_PIXEL_DATA_INTACT);<br>
<br>
pDICOMELEMENT pElement = ds.FindFirstElement(NULL, TAG_PIXEL_DATA, TRUE);<br>
<br>
/*<br>
pHandle = lBmp.GetHandle();<br>
pHandle is OK. (as 12Bits Image value)<br>
Max Value = 4095 and so on<br>
*/<br>
#if TRUE<br>
nRet = ds.SetImage(pElement, pHandle,<br>
IMAGE_COMPRESSION_NONE,<br>
IMAGE_PHOTOMETRIC_MONOCHROME2,<br>
12, // 16?<br>
0,<br>
DICOM_SETIMAGE_AUTO_SET_VOI_LUT | DICOM_SETIMAGE_KEEP_LUTS_INTACT,<br>
NULL, NULL);<br>
#else<br>
nRet = ds.InsertImage(NULL, pHandle, 0, <br>
IMAGE_COMPRESSION_NONE,<br>
IMAGE_PHOTOMETRIC_MONOCHROME2,<br>
12, // or 16?<br>
0,<br>
DICOM_SETIMAGE_KEEP_LUTS_INTACT | DICOM_SETIMAGE_AUTO_SET_VOI_LUT,<br>
NULL, NULL);<br>
#endif<br>
<br>
nRet = ds.SaveDS(_T("d:\\out_16A_12S-1.dcm"), NULL);<br>
<br>
<br>
<br>
 

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 : Monday, May 12, 2008 9:33:03 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


I apologize if I miss anything, your post was very difficult to read because of the HTML you attempted to insert.  Please keep in mind that our forums do not support HTML formatting.

1.
Please take a look in the v14.5 main COM helpfile's article for the ILEADRasterProcess.GetBitmapStatisticsInfo method because it has a C++ example.

2.
Take a look at this forum post, specifically the post written 02-13-2008, 10:41:

http://support.leadtools.com/SupportPortal/cs/forums/18865/ShowPost.aspx

Though the code snippet is using our .NET libraries, the same functions exist in the 14.5 COM interface:

ILEADRasterProcess.Grayscale
ILEADRasterProcess.ShiftData
ILEADRasterProcess.GetMinMaxVal
ILEADRasterProcess.ApplyLinearVOILUT
ILEADDicomDS.InsertBitmapValue


 
#3 Posted : Monday, May 12, 2008 5:42:53 PM(UTC)

majorss  
majorss

Groups: Registered
Posts: 7


Thank you for your reply.

I'll try it.

ps. I'm sorry about HTML tags.

When I saw the preview, it support HTML tags. So I posted. But main view is not.

I tried to edit or delete a post but show up follow message

"Permission Expired: Post Edit Permission Expired
The administrator(s) have configured this forum to have a time limit for editing messages. If you still require a message to be edited, please check with a forum moderator."
 
#4 Posted : Tuesday, May 13, 2008 4:27:31 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


No worries about the HTML, it happens.  I'm pretty sure if you're the owner of the post, you should be able to modify it.  Try logging out and logging back in.  If that doesn't work, I'll look into it and speak with our forum administrator.
 
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.079 seconds.