コード例 #1
0
        public static MedViewerControlCell Clone(this MedViewerControlCell cell)
        {
            try
            {
                var duplicatedCell = new MedViewerControlCell();
                if (cell.Image != null && cell.Image.Pages != null && cell.Image.Pages.Any())
                {
                    //fix bug 154567 2012-09-19
                    var filmingCard = FilmingViewerContainee.FilmingViewerWindow as FilmingCard;
                    if (filmingCard != null)
                    {
                        if (dataAccessor == null)
                        {
                            dataAccessor = new DataAccessor(filmingCard.FilmingViewerConfiguration); //use filming card 's configuration, //why default configuration not use filming's
                        }

                        var sourceDisplayData = cell.Image.Pages.First();
                        var dd = dataAccessor.CopyImageDataForFilmingF1(sourceDisplayData);
                        dd.UserSpecialInfo = sourceDisplayData.UserSpecialInfo;
                        dd.Tag             = sourceDisplayData.Tag.DeepClone();
                        if (null != sourceDisplayData.DicomHeader)
                        {
                            dd.DicomHeader = sourceDisplayData.DicomHeader;
                        }
                        duplicatedCell.Image.AddPage(dd);
                    }
                }

                return(duplicatedCell);
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.StackTrace);
                throw;
            }
        }