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 19, 2008 3:11:46 AM(UTC)
leftback

Groups: Registered
Posts: 28


I want to copy the image from a medical viewer cell to a raster image viewer. I can do all that with the clone method and can even handle any scaling performed on the medical viewer cell BUT I cant figure out how to apply the offset from the medical viewer cell to the raster image viewer

What im trying to do is lay a raster image viewer on top of a medical viewer cell so that it looks the same as before.

thisScale = cell.GetScale(0);
int thisScaleI = Convert.ToInt32(thisScale);

MedicalViewer myViewer = cell.ParentViewer;
int cellIndex = cell.Index;
MedicalViewerOffset thisOffset = (MedicalViewerOffset)myViewer .GetActionProperties(MedicalViewerActionType.Offset, cellIndex);

//SET SCALING TO BE THE SAME AS IN MEDICAL VIEWER CELL
imageWidth = Convert.ToInt32((cell.Image.Width * 100) / thisScaleI);
imageHeight = Convert.ToInt32((cell.Image.Height * 100) / thisScaleI);


locationX = Convert.ToInt32((cell.Image.Width - imageWidth) / 2);
locationY = Convert.ToInt32((cell.Image.Height - imageWidth) / 2);

// Copy the medical viewer cell image into the raster viewer
Rectangle rect = new Rectangle(locationX, locationY, imageWidth, imageHeight);
m_rasterViewer.Image = cell.Image.Clone(rect);

?????? Where do i apply the offset so that the image is in the same position on the raster image viewer as the Medical viewer cell????????

I'm using Leadtools 15 and .NET

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 : Monday, May 19, 2008 9:25:41 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 367

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

I'm not sure what you're trying to accomplish is going to be possilbe with the raster
image viewer, but I'd like to try to better understand what you're trying to accomplish.

You stated that you're trying to lay a raster image viewer over the medical viwer. Are
you trying to mimic the medical viewer with the raster viewer? What is your reason behind
doing this?

I need a better idea of the big picture in order to assist you.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Tuesday, May 20, 2008 3:35:21 AM(UTC)
leftback

Groups: Registered
Posts: 28


Hey Walter

I need to mimic the medical viewer with the raster viewer so as to get access to the annotation container in the raster image viewer, I will then add some annotations (where by I need to adjust thier properties like precision, colour etc etc as I draw them) to the raster image viewer and save them to a .Ann file.

I will then load these annotations to the medical viewer cell so that it looks like the work was carried out on the medical viewer itself.

In short I'm trying to implement a work around for the fact that I cant get access to the medical viewer cell's annotation container. Its almost working too except for this offset business!

thanks
 
#4 Posted : Tuesday, May 20, 2008 10:14:43 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 367

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

The RasterImageViewer doesn't have the concept of offsets like the MedicalViewer. You'll need to manually paint to a Graphics object on the form using the RasterImage.Paint method.

You'll also want to check out a posted MedicalViewer demo that uses annotations. You can find it here: http://support.leadtools...rums/20832/ShowPost.aspx

Note: The RasterImageViewer isn't necessary for modifying the annotations as shown in the demo. Any changes in the properties should be able to be done behind the scenes without a viewer.
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
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.073 seconds.