Do you have a question?

First Name:
Surname:
Email:
Phone:
Message:
Get Audio Code

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

--
04 Apr 2012 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

stewartUser is Offline
Veteran Member
Veteran Member
Posts:2359

--
10 Apr 2012 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
Aneta CUser is Offline
New Member
New Member
Posts:3

--
12 Apr 2012 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