Exemplo n.º 1
0
 /**
  * 添加构造方法
  */
 public PrintJob(PrintOptions options)
 {
     FilmSession = new FilmSession(DicomUID.BasicFilmSessionSOPClass)
     {
         FilmSessionLabel = options.JobLabel,
         MediumType       = options.MediumType.ToStringEx(),
         NumberOfCopies   = options.PrintNumberOfCopies,
         IsColor          = options.ColorType == PrintColorType.Color,
         FilmDestination  = options.FilmDestination,
         PrintPriority    = options.Priority.ToStringEx()
     };
 }
Exemplo n.º 2
0
        /**
         * 添加重载函数
         */
        public FilmBox StartFilmBox(PrintOptions options)
        {
            FilmBox filmBox = new FilmBox(FilmSession, null, DicomTransferSyntax.ExplicitVRLittleEndian)
            {
                ImageDisplayFormat = options.ImageDisplayFormat,
                FilmOrientation    = options.Orientation.ToStringEx(),
                FilmSizeID         = options.FilmSize.ToStringEx(),
                MagnificationType  = options.MagnificationType.ToStringEx(),
                BorderDensity      = options.BorderDensity.ToStringEx(),
                EmptyImageDensity  = options.EmptyImageDensity.ToStringEx(),
                MinDensity         = 0,
                MaxDensity         = 256,
            };

            filmBox.Initialize();
            FilmSession.BasicFilmBoxes.Add(filmBox);

            _currentFilmBox = filmBox;
            return(filmBox);
        }
Exemplo n.º 3
0
        public async Task PrintImagesAsync(string serverIp, int serverPort, string serverAET, string localAET, PrintOptions options, IEnumerable <Bitmap> images)
        {
            PrintJob printJob = new PrintJob(options)
            {
                RemoteAddress = serverIp,
                RemotePort    = serverPort,
                CallingAE     = localAET,
                CalledAE      = serverAET
            };

            foreach (Bitmap image in images)
            {
                printJob.StartFilmBox(options);
                printJob.AddImage(image, 0);
                printJob.EndFilmBox();
            }

            await printJob.Print();
        }