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
|