Friday, May 24, 2013
Google Custom Search

Our Community

Membership Membership:
Latest New User Latest: Ivantack
New Today New Today: 0
New Yesterday New Yesterday: 14
User Count Overall: 28681

People Online People Online:
Visitors Visitors: 14
Members Members: 0
Total Total: 14

Online Now Online Now:

ClearCanvas Community Forums

We've moved our Developer Forums!
To better assist our open source community, we have moved our repository and developer forums to GitHub. You can access the new developer forums on our ClearCanvas GitHub issues board.

Reading existing annotations from key images
Last Post 2012-04-12 09:43 AM by Aneta. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Aneta
New Member
New Member
Posts:3

--
2012-04-04 03:12 PM

 Hi, 

I am trying to read an annotation roi from a key image.  What function can I use to do so?  (I am reading the documentation but haven't found how to do it, yet.)

I am using Selected graphic to detect ROIs drawn on the image.  

RoiGraphic graphic =   this.ImageViewer.SelectedPresentationImage.SelectedGraphic as RoiGraphic; 

Thank you!

Aneta

stewart
Senior Member
Senior Member
Posts:2336

--
2012-04-10 08:52 AM
Annotations drawn on key images are not select-able, and they are not in the "overlay graphics", provided by IOverlayGraphicsProvider.

You can cast the presentation image to IDicomPresentationImage, and look at the graphics in the DicomGraphics property. These will not be RoiGraphic objects, like the user-drawn ROIs. You will likely need to look for primitive graphics, like EllipsePrimitive, RectanglePrimitive, etc. I believe all the lines are PolyLineGraphics, though.

Hope this helps,
Stewart
Live and real-time support available for Personal and Team Edition customers
Aneta
New Member
New Member
Posts:3

--
2012-04-12 09:43 AM

 Hi Stewart,

Thank you for your reply!

I am testing on a key image with an ellipse drawn on in with the roi statics saved on the image.  I do the following:

IDicomPresentationImage presentationState = this.ImageViewer.SelectedPresentationImage as IDicomPresentationImage;

DicomGraphicsPlane presentationStategraphic = DicomGraphicsPlane.GetDicomGraphicsPlane(presentationState);

int num = presentationStategraphic.Graphics.Count;

- the count returns number of graphic as two but all of the graphic types return null

foreach (IGraphic graphic2 in presentationStategraphic.Graphics)

            {

               if (graphic2 != null)

                {

                    PolylineGraphic line = graphic2 as PolylineGraphic;

                    if (line != null)

                    {

                        Debug.WriteLine("not null line");

                    }

                    EllipsePrimitive ellipse = graphic2 as EllipsePrimitive;

                    if (ellipse != null)

                    {

                        Debug.WriteLine("not null ellipse");

                    }

                    RectanglePrimitive rect = graphic2 as RectanglePrimitive;

                    if (rect != null)

                    {

                        Debug.WriteLine("not null rect");

                    }

                    CurvePrimitive curve = graphic2 as CurvePrimitive;

                    if (curve != null)

                    {

                        Debug.WriteLine("not null curve");

                    }

                    ArcPrimitive arc = graphic2 as ArcPrimitive;

                    if (arc != null)

                    {

                        Debug.WriteLine("not null arc");

                    }

                    LinePrimitive line2 = graphic2 as LinePrimitive;

                    if (line2 != null)

                    {

                        Debug.WriteLine("not null line");

                    }

                }

            }

  Any suggestions?

Could the only annotations detected be the roi statistics and the line connecting them to the ellipse?

Thanks!

Aneta

            

You are not authorized to post a reply.

Active Forums 4.1
Copyright 2013 ClearCanvas Inc. All Rights Reserved