Thursday, February 09, 2012
Google Custom Search

ClearCanvas Highlights

Download our Open Source software
Watch some Videos
Get the Source
Check out our Licensing
Join our  Forums
Some Research: OICR IPP-Trials

Our Community

Membership Membership:
Latest New User Latest: VMCCNY
New Today New Today: 18
New Yesterday New Yesterday: 26
User Count Overall: 20581

People Online People Online:
Visitors Visitors: 12
Members Members: 4
Total Total: 16

Online Now Online Now:
01: Chimarides
02: Leighann
03: lecalos
04: VMCCNY

ClearCanvas Community Forums

Problem of values of coordinates when moving an object
Last Post 2010-06-08 03:14 PM by marcela_azul. 0 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
marcela_azul
New Member
New Member
Posts:6

--
2010-06-08 03:14 PM  

Hello, I am doing plugin and I have a problem with the values of the coordinates.

For example, drawing a rectangle of 64 xs 64 on the Dicom image, and when I move that rectangle with mouse, also changes to the values of the coordinates and the size to me, that after moving it is left me in 11,45267 xs 11,45267.

 

Example, drawing a rectangle in position (100; 100) (topleft)

I hardly move the rectangle with mouse, and it says to me that it is in the coordinates (146;18) (topleft), that are erroneous values of coordinates.

 

What I need is to obtain a part of the image, the part that I select with a rectangle, that is to say I need to obtain the coordinates of the rectangle to trim that part of the image.

 

Part of the code:

CompositeGraphic compositeGCP = new CompositeGraphic();

RectanglePrimitive gcp = new RectanglePrimitive();

 

gcp.CoordinateSystem = CoordinateSystem.Destination;

gcp.TopLeft = new PointF(100, 100);

gcp.BottomRight = new PointF(163, 163);

 

MoveControlGraphic rectangleMoveControlGraphic = new MoveControlGraphic(gcp);

BoundableResizeControlGraphic rectangleResizeControlGraphic = new BoundableResizeControlGraphic(rectangleMoveControlGraphic);

               

// Add the rectangle to the composite

compositeGCP.Graphics.Add(rectangleResizeControlGraphic);

 

You are not authorized to post a reply.

Active Forums 4.1
Copyright 2011 ClearCanvas Inc.