Setting up a print server - how to

294 views
Skip to first unread message

Patrick Johnston

unread,
Jan 16, 2019, 10:08:32 PM1/16/19
to dcm4che
I'd like to setup a dicom print server, so that ultrasound machines can connect to the server as a dicom device, and then print the images to a normal paper (postscript, non-dicom) printer. 

I get the feeling that dcm4chee or dcm4che can do this, but I don't have any idea how to start, or how things would be linked together to make it happen, so was hoping someone could give me some basic advice and point me in the right direction. I'm happy to code missing parts if required.

This is how I see the workflow going:

1) server receives a dicom file directly from another dicom device (pushed). 
2) converts to jpg or some other common format. Possibly add a header/footer to the page.
3) prints it to a default printer

Is there a way to trigger a script once the server has received a file so that I can carry out 2 and 3 in an automated fashion? 

Any help at all is appreciated!


Patrick Johnston

unread,
Jan 18, 2019, 7:52:45 PM1/18/19
to dcm4che
 OK, so I've made some progress, but now I'm not getting any image data - hopefully someone can help?

I had trouble building the source via maven/eclipse but eventually managed to do that.

I'm now looking at extending BasicCStoreSCP to do what I need. I've created two services - FilmSession and FilmBox which seem to be called correctly when I try to print to this server

I am getting information about the film box, but I don't seem to be getting any image data. 

Here's my basic code:

protected void store(Association as, PresentationContext pc, Attributes rq,
            PDVInputStream data, Attributes rsp) throws IOException {
   
    System.out.println("FilmBox handling data");
    DicomInputStream dis = new DicomInputStream(data);
    Attributes attr = dis.readDataset(-1,-1);
    System.out.println("FilmBox exclude bulk data = " + dis.isExcludeBulkData() );
    dis.close();
   
    }

and here are the attributes I get:

(2010,0010) ST [STANDARD\4,4] ImageDisplayFormat
(2010,0040) CS [PORTRAIT] FilmOrientation
(2010,0050) CS [8INX10IN] FilmSizeID
(2010,0060) CS [NONE] MagnificationType
(2010,0080) CS [NORMAL] SmoothingType
(2010,0100) CS [BLACK] BorderDensity
(2010,0110) CS [BLACK] EmptyImageDensity
(2010,0120) US [0] MinDensity
(2010,0130) US [399] MaxDensity
(2010,0140) CS [NO] Trim
(2010,0150) ST [Value 1] ConfigurationInformation
(2010,0500) SQ [1 Items] ReferencedFilmSessionSequence
>Item #1
>(0008,1150) UI [1.2.840.10008.5.1.1.1] ReferencedSOPClassUID
>(0008,1155) UI [] ReferencedSOPInstanceUID
(2020,0050) CS [STANDARD] RequestedResolutionID


But I don't seem to get any data after that - what am I missing in order to get the pixel data?

Is there any overviews on how this is supposed to work? I can't find much online apart from specifications, but no overview of the process for dcm4che or dicom itself?





gunterze

unread,
Jan 20, 2019, 2:45:12 AM1/20/19
to dcm4che
dcm4che-5.x does not provide a utility providing DICOM Print Management Services. DICOM Print Management Services work quite different than DICOM Store Services! Long time ago, I implemented a DICOM Print Server based on dcm4che14: https://sourceforge.net/p/dcm4che/svn/HEAD/tree/dcm4chee/dcm4chee-prn/trunk/

gunterze

unread,
Jan 20, 2019, 6:03:43 AM1/20/19
to dcm4che
You may also install dcm4chee-arc-5.x, with configured Pre-fetch of WADO objects and Deletion of least recently accessed studies.
Reply all
Reply to author
Forward
0 new messages