LEADTOOLS Support
Imaging
Imaging SDK Questions
Change region border properties (width, color etc)
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, October 3, 2007 11:29:08 AM(UTC)
Groups: Registered
Posts: 9
Hi,
Is there any way I could change the properties of a region border (region implemented with LBitmapRgn) like color and border width?
I didn't find anything in the documentation but maybe there is a not-so-obvious way to do it.
Thanks,
Arg
#2
Posted
:
Thursday, October 4, 2007 12:01:04 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Arg,
There is no direct way to do
that using LEADTOOLS functions. However, you might be able to implement your
own solution based on the LBitmapRgn::GetClipSegments function. To do this, get
all segments and draw the needed pixels at the desired color and weight at the
2 ends of each segment.
#3
Posted
:
Friday, October 5, 2007 3:54:35 AM(UTC)
Groups: Registered
Posts: 9
GetClipSegments will return the pixel coordinates relative to the image. How can I get the region border pixels relative to the display (taking into account zoom, scale, rotate etc)?
As a side note I'm using LImageViewer to display the image.
Thanks
#4
Posted
:
Sunday, October 7, 2007 5:25:28 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
I checked your question
again and there's actually a better function to use, which is LBitmap::GetRgnContourPoints.
About converting the
resulting points to display coordinates, how exactly are you displaying the
image? (which LEADTOOLS object or functions are you using)?
#5
Posted
:
Monday, October 8, 2007 8:44:25 AM(UTC)
Groups: Registered
Posts: 9
I'm displaying the DICOM image by inserting it in a cell of LImageViewer. I also specify that I want it to fit the container window.
I guess the real question is: how can I retrieve the display coordinates of any given image pixel at any moment using LImageViewer?
#6
Posted
:
Monday, October 8, 2007 11:52:47 PM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Arg,
I have looked in LEADTOOLS
help files and found some useful information regarding Translating Coordinates,
please read these topics:
- Translating Coordinates for a Bitmap Region.
- RGNXFORM.
Please let me know if you
need further assistance.
#7
Posted
:
Tuesday, October 9, 2007 5:00:37 AM(UTC)
Groups: Registered
Posts: 9
I already checked those topics and I couldn't find an answer to this question. That's why I posted this message.
- GetRgnXForm always returns RGNXFORM with all members set to 0
LBitmap bitmap(&hBitmap); // bitmap is a valid bitmap
LBitmapRgn rgn(&bitmap); //rgn is a valid region
RGNXFORM xForm;
rgn.GetRgnXForm(&xf);
xf has all values set to 0
-PointFromBitmap which should translate the coordinates from bitmap to display doesn't seem to work. The coordinates pased to the function are always unchanged:
LBitmap bitmap(&hBitmap);
int x = 100;
int y = 100;
bitmap.PointFromBitmap(1, &x, &y);
x and y are unchanged although the image is resized to fit the display. Same thing happens if the image is rotated.
I am using LImageViewer to display the image so this may affect the way these API functions work.
I would appreciate any help to solve this issue.
#8
Posted
:
Wednesday, October 10, 2007 12:43:51 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Arg,
The LImageViewer control
does not work like the rest of our Class Library. This means if you use it to
display images, normal region and painting functions will not be available to
you.
LEADTOOLS Support
Imaging
Imaging SDK Questions
Change region border properties (width, color etc)
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.