private void DrawImageBoxes(IEnumerable <IImageBox> imageBoxes)
        {
            List <IImageBox> imageBoxesToDraw = new List <IImageBox>(imageBoxes);

            //Then calculate the reference lines.
            _referenceLineTool.RefreshAllReferenceLines();

            foreach (IPresentationImage image in _referenceLineTool.GetImagesToRedraw())
            {
                //Only draw images that won't be drawn as a result of the image boxes being drawn.
                if (!imageBoxesToDraw.Contains(image.ParentDisplaySet.ImageBox))
                {
                    image.Draw();
                }
            }

            Draw(imageBoxesToDraw);
        }
 internal void OnRefreshedReferenceLines()
 {
     Draw(_referenceLineTool.GetImagesToRedraw());
 }