Пример #1
0
        void OnQueryPageSettings(object sender, QueryPageSettingsEventArgs e)
        {
            OnStatusUpdate(string.Format("Printing film {0} of {1}", _currentPage + 1, FilmBoxFolderList.Count));
            var filmBoxFolder = string.Format("{0}\\{1}", FullPrintJobFolder, FilmBoxFolderList[_currentPage]);
            var filmSession   = FilmSession.Load(string.Format("{0}\\FilmSession.dcm", filmBoxFolder));

            _currentFilmBox = FilmBox.Load(filmSession, filmBoxFolder);

            e.PageSettings.Margins.Left   = 25;
            e.PageSettings.Margins.Right  = 25;
            e.PageSettings.Margins.Top    = 25;
            e.PageSettings.Margins.Bottom = 25;

            e.PageSettings.Landscape = _currentFilmBox.FilmOrienation == "LANDSCAPE";
        }
Пример #2
0
        public void Load_BasicFilmBox_ExpectedSopClassFound()
        {
            var path = @".\Test Data\Film Box Test 2";

            if (Directory.Exists(path))
            {
                Directory.Delete(path, true);
            }
            Directory.CreateDirectory(path);

            var expected = DicomUID.Generate();

            var session = new FilmSession(DicomUID.BasicFilmSession);
            var box     = new FilmBox(session, expected, DicomTransferSyntax.ImplicitVRLittleEndian);

            box.BasicImageBoxes.Add(new ImageBox(box, DicomUID.BasicGrayscaleImageBox, null));
            box.Save(path);

            var loaded = FilmBox.Load(session, path);
            var actual = loaded.SOPInstanceUID;

            Assert.Equal(expected, actual);
            Assert.True(loaded.BasicImageBoxes.Count > 0);
        }