You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[STANDARD]
[1,1]
(2010,0040) CS 0x00000008 Film Orientation
[PORTRAIT]
(2010,0050) CS 0x0000000A Film Size ID
[14INX17IN]
(2010,0060) CS 0x0000000A Magnification Type
[REPLICATE]
(2010,0080) CS 0x00000000 Smoothing Type
(2010,0100) CS 0x00000006 Border Density
[BLACK]
(2010,0110) CS 0x00000006 Empty Image Density
[BLACK]
(2010,0120) US 0x00000002 Min Density
[0]
(2010,0130) US 0x00000002 Max Density
[400]
(2010,0140) CS 0x00000004 Trim
[YES]
(2010,0150) ST 0x00000000 Configuration Information
==> The data exchange ends here without success.
To Reproduce
Steps to reproduce the behavior (code snippet or clear description)
Expected behavior
public async Task SendPrintJobAsync(Dicom.Network.Client.DicomClient client, string imagePath)
{
var filmSession = new DicomDataset();
filmSession.Add(DicomTag.NumberOfCopies, 1);
filmSession.Add(DicomTag.PrintPriority, "LOW");
filmSession.Add(DicomTag.MediumType, "BLUE FILM");
filmSession.Add(DicomTag.FilmDestination, "PROCESSOR");
var filmBox = new DicomDataset();
filmBox.Add(DicomTag.ImageDisplayFormat, "STANDARD\\1,1");
filmBox.Add(DicomTag.FilmOrientation, "PORTRAIT");
filmBox.Add(DicomTag.FilmSizeID, "14INX17IN");
filmBox.Add(DicomTag.MagnificationType, "REPLICATE");
filmBox.Add(DicomTag.SmoothingType, "");
filmBox.Add(DicomTag.BorderDensity, "BLACK");
filmBox.Add(DicomTag.EmptyImageDensity, "BLACK");
filmBox.Add(DicomTag.MinDensity, "0");
filmBox.Add(DicomTag.MaxDensity, "400");
filmBox.Add(DicomTag.Trim, "YES");
filmBox.Add(DicomTag.ConfigurationInformation, "");
var image = new DicomImage(imagePath);
var bitmap = image.RenderImage().As<Bitmap>();
var dataset = new DicomDataset();
dataset.Add<ushort>(DicomTag.Columns, (ushort)bitmap.Width)
.Add<ushort>(DicomTag.Rows, (ushort)bitmap.Height)
.Add<ushort>(DicomTag.BitsAllocated, 8)
.Add<ushort>(DicomTag.BitsStored, 8)
.Add<ushort>(DicomTag.HighBit, 7)
.Add(DicomTag.PixelRepresentation, (ushort)PixelRepresentation.Unsigned)
.Add(DicomTag.PlanarConfiguration, (ushort)PlanarConfiguration.Interleaved)
.Add<ushort>(DicomTag.SamplesPerPixel, 1)
.Add(DicomTag.PhotometricInterpretation, PhotometricInterpretation.Monochrome2.Value);
var pixelData = DicomPixelData.Create(dataset, true);
var pixels = GetGrayBytes(bitmap);
var buffer = new MemoryByteBuffer(pixels.Data);
pixelData.AddFrame(buffer);
var imageBox = dataset;
try
{
var filmSessionUID = DicomUID.Generate();
var createFilmSessionRequest = new DicomNCreateRequest(DicomUID.BasicFilmSession, filmSessionUID);
createFilmSessionRequest.Dataset = filmSession;
await client.AddRequestAsync(createFilmSessionRequest);
var filmBoxUID = DicomUID.Generate();
var createFilmBoxRequest = new DicomNCreateRequest(DicomUID.BasicFilmBox, filmBoxUID);
createFilmBoxRequest.Dataset = filmBox;
await client.AddRequestAsync(createFilmBoxRequest);
var sopInstanceUID = DicomUID.Generate();
var setImageBoxRequest = new DicomNSetRequest(DicomUID.BasicGrayscaleImageBox, sopInstanceUID);
setImageBoxRequest.Dataset = imageBox;
await client.AddRequestAsync(setImageBoxRequest);
var printRequest = new DicomNActionRequest(DicomUID.BasicFilmSession, filmSessionUID, 1);
await client.AddRequestAsync(printRequest);
await client.SendAsync();
Console.WriteLine("Print job sent successfully.");
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
Screenshots or test DICOM files
DICOM Print operation does not proceed to the end.
I added my code. Could you please comment where the problem is?
Environment
Fellow Oak DICOM version: 4.0.8
OS: Windows 10 x64
Platform: .NET Framework 4.8.2
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
09:01:56[1]<<: Associate Request
Called AE: BUNNY
Calling AE: PrintSCU
Application Context: 1.2.840.10008.3.1.1.1
Presentation Context ID: 1 - 1.2.840.10008.5.1.1.9
Transfer Syntax: 1.2.840.10008.1.2
Presentation Context ID: 3 - 1.2.840.10008.5.1.1.18
Transfer Syntax: 1.2.840.10008.1.2
Maximum Length: 262144
Implementation Class UID: 1.3.6.1.4.1.30071.8
Implementation Version Name: fo-dicom 4.0.8
09:01:56[1]>>: Associate Accept
Called AE: BUNNY
Calling AE: PrintSCU
Application Context: 1.2.840.10008.3.1.1.1
Presentation Context ID: 1 - Accepted
Transfer Syntax: 1.2.840.10008.1.2
Presentation Context ID: 3 - Rejected
Maximum Length: 262144
Implementation Class UID: 1.2.826.0.1.3680043.2.1211.1
Implementation Version Name: DTK
09:01:56[1]:<< NCreate Request
PID: 1, Message ID: 13, Dataset: 0202h
Affected SOP Class UID: 1.2.840.10008.5.1.1.1
Affected SOP Instance UID: 2.25.257677750321689558050707301560348758412
09:01:56[1]:<< NCreate Request Single Dataset
(2000,0010) IS 0x00000002 Number of Copies
09:01:56[1]:>> NCreate Response
PID: 1, Message ID: 13, Dataset: 0101h, Status: 0000h
Affected SOP Class UID: 1.2.840.10008.5.1.1.1
Affected SOP Instance UID: 1.2.826.0.1.3680043.2.1211.9.1
09:01:56[1]:<< NCreate Request
PID: 1, Message ID: 14, Dataset: 0202h
Affected SOP Class UID: 1.2.840.10008.5.1.1.2
Affected SOP Instance UID: 2.25.300094047817618521352642136711381500308
09:01:56[1]:<< NCreate Request Single Dataset
(2010,0010) ST 0x0000000C Image Display Format
==> The data exchange ends here without success.
To Reproduce
Steps to reproduce the behavior (code snippet or clear description)
Expected behavior
Screenshots or test DICOM files
DICOM Print operation does not proceed to the end.
I added my code. Could you please comment where the problem is?
Environment
Fellow Oak DICOM version: 4.0.8
OS: Windows 10 x64
Platform: .NET Framework 4.8.2
The text was updated successfully, but these errors were encountered: