GithubHelp home page GithubHelp logo

dcm4che / dcm4che Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 637.0 66.99 MB

DICOM Implementation in JAVA

Home Page: www.dcm4che.org

License: Other

Shell 2.10% XSLT 4.59% Java 74.54% Batchfile 1.74% CSS 0.02% sed 0.02% Smarty 16.99%

dcm4che's Introduction

dcm4che DICOM Toolkit & Library

Sources: https://github.com/dcm4che/dcm4che
Binaries: https://sourceforge.net/projects/dcm4che/files/dcm4che3
Issue Tracker: https://github.com/dcm4che/dcm4che/issues
Build Status: Build

This is a complete rewrite of dcm4che-2.x.

One main focus was to minimize the memory footprint of the DICOM data sets. It already provides modules to store/fetch configuration data to/from LDAP, compliant to the DICOM Application Configuration Management Profile, specified in DICOM PS 3.15, Annex H.

dcm4che uses a native library for the compression and decompression of images. Here is the list of supported systems and architectures:

System Architecture Package Requirement
Linux x86 64-bit linux-x86-64 GLIBC_2.17
Linux ARM 64-bit linux-aarch64 GLIBC_2.27
Linux ARM 32-bit linux-armv7a GLIBC_2.28
Windows x86 64-bit windows-x86-64 Windows 7 or higher
Windows x86 32-bit windows-x86 Windows 7 or higher
Mac OS x86 64-bit macosx-x86-64 Mac OS 10.13 or higher
Mac OS ARM 64-bit macosx-aarch64 Mac OS 11 or higher

Build

Make sure you have Java 17 (JDK) or newer installed.

Run the Maven Wrapper script for building:

./mvnw install

or on Windows:

.\mvnw install

Modules

  • dcm4che-audit
  • dcm4che-audit-keycloak
  • dcm4che-conf
    • dcm4che-conf-api
    • dcm4che-conf-api-hl7
    • dcm4che-conf-json
    • dcm4che-conf-json-schema
    • dcm4che-conf-ldap
    • dcm4che-conf-ldap-audit
    • dcm4che-conf-ldap-hl7
    • dcm4che-conf-ldap-imageio
    • dcm4che-conf-ldap-schema
  • dcm4che-core
  • dcm4che-dcmr
  • dcm4che-deident
  • dcm4che-dict
  • dcm4che-dict-priv
  • dcm4che-emf
  • dcm4che-hl7
  • dcm4che-image
  • dcm4che-imageio
  • dcm4che-imageio-opencv
  • dcm4che-imageio-rle
  • dcm4che-js-dict
  • dcm4che-json
  • dcm4che-mime
  • dcm4che-net
  • dcm4che-net-audit
  • dcm4che-net-hl7
  • dcm4che-net-imageio
  • dcm4che-soundex
  • dcm4che-ws-rs
  • dcm4che-xdsi
  • dcm4che-jboss-modules

Utilities

  • agfa2dcm: Extract DICOM files from Agfa BLOB file
  • agfa2sr: Extract concatenated XML Agfa Reports and convert them to DICOM SR Documents
  • dcm2dcm: Transcode DICOM file according the specified Transfer Syntax
  • dcm2jpg: Convert DICOM image to JPEG or other image formats
  • dcm2json: Convert DICOM file in JSON presentation
  • dcm2pdf: Extract encapsulated PDF, CDA or STL from DICOM file
  • dcm2str: Apply Attributes Format Pattern to dicom file or command line parameters.
  • dcm2xml: Convert DICOM file in XML presentation
  • dcmbenchmark: Parse a DICOM file repetitively, measuring time and used memory
  • dcmdir: Dump, create or update DICOMDIR file
  • dcmdump: Dump DICOM file in textual form
  • dcmldap: Insert/remove configuration entries for Network AEs into/from LDAP server
  • dcmqrscp: Simple DICOM archive
  • dcmvalidate: Validate DICOM object according a specified Information Object Definition
  • deidentify: De-identify one or several DICOM files
  • emf2sf: Convert DICOM Enhanced Multi-frame image to legacy DICOM Single-frame images
  • findscu: Invoke DICOM C-FIND Query Request
  • fixlo2un: Fixes length of private tags truncated to 2 bytes on conversion from implicit VR to explicit VR Transfer Syntax
  • getscu: Invoke DICOM C-GET Retrieve Request
  • hl72xml: Convert HL7 v2.x message in XML presentation
  • hl7pdq: Query HL7 v2.x Patient Demographics Supplier
  • hl7pix: Query HL7 v2.x PIX Manager
  • hl7rcv: HL7 v2.x Receiver
  • hl7snd: Send HL7 v2.x message
  • ianscp: DICOM Instance Availability Notification receiver
  • ianscu: Send DICOM Instance Availability Notification
  • jpg2dcm: Convert JPEG images or MPEG videos in DICOM files
  • json2dcm: Converts JSON file to DICOM file
  • json2index: Creates search index for UI configuration from JSON schema files
  • json2props: Convert Archive configuration schema JSON files to key/value properties files and vice versa
  • json2rst: Generate ReStructuredText files from Archive configuration schema JSON files
  • maskpxdata: Mask information burned into the Pixel Data
  • mkkos: Make DICOM Key Object Selection Document
  • modality: Simulates DICOM Modality
  • movescu: Invoke DICOM C-MOVE Retrieve request
  • mppsscp: DICOM Modality Performed Procedure Step Receiver
  • mppsscu: Send DICOM Modality Performed Procedure Step
  • pdf2dcm: Convert PDF file into DICOM file
  • planarconfig: Detects the actual planar configuration of uncompressed pixel data of color images with Photometric Interpretation RGB or YBR_FULL and optionally correct non matching values of attribute Planar Configuration of the image
  • qstar: QStar SOAP Client to prefetch/retrieve or fetch file information of specified files
  • stgcmtscu: Invoke DICOM Storage Commitment Request
  • storescp: DICOM Composite Object Receiver
  • storescu: Send DICOM Composite Objects
  • stowrs: Send DICOM Composite Objects or Bulkdata file over Web
  • stowrsd: STOW-RS Server
  • swappxdata: Swaps bytes of uncompressed pixel data in DICOM files
  • syslog: Send Syslog messages via TCP/TLS or UDP to a Syslog Receiver
  • syslogd: Receives RFC 5424 Syslog messages via TCP/TLS or UDP
  • tpl2xml: Converts private dictionaries present in template file(s) to xml file(s).
  • upsscu: Invokes services of Unified Procedure Step Service Class
  • wadors: Wado RS Client Simulator
  • wadows: Wado WS Client Simulator
  • xml2dcm: Create/Update DICOM file from/with XML presentation
  • xml2hl7: Create HL7 v2.x message from XML presentation
  • xroad: XRoad SOAP Client to query Estonia National Patient Registry for Patient Demographics

License

dcm4che's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcm4che's Issues

Export and Import Dicm Files

How can I export dicom files from my client machine to the pacs server, and how to download dicom files from pacs server to local machine ??

Wrong VR for SourceApplicationEntityTitle in Attributes created by Association.createFileMetaInformation(..)

On the master ( and on the other branches ), on line 1228 of Association.java in createFileMetatInformation ( project dcm4che-net ) we can find :
fmi.setString(Tag.SourceApplicationEntityTitle, VR.SH, getRemoteAET());

The VR use shall be AE and not SH see the following link
https://www.dabsoft.ch/dicom/6/7/#(0002,0016)

This shall be changed to
fmi.setString(Tag.SourceApplicationEntityTitle, VR.AE, getRemoteAET());

Modify Attributes.addAll() to preserve non-conflicting Private Creator ID tag positions

Attributes.addAll() should preserve non-conflicting Private Creator ID tag positions.

This behavior was originally implemented in commit 7c1d8f4

Unfortunately it was broken with the bug fix for http://dcm4che.org/jira/browse/LIB-362 (Commit 764d9c4 ).

The behavior has to be restored (of course also preserving the bug fix for LIB-362).

New unit tests (AttributesTest) should be implemented to ensure that this behavior doesn't break again.

dcm2dcm fails to find ImageWriter for format jpeg

Mac
screen shot 2017-03-15 at 5 53 23 pm

Windows
screen shot 2017-03-15 at 5 56 58 pm

Tried this with various other syntaxes and got the same result. I'm looking for j2ki in particular. The input file is a multiframe mammo. Have also tried it with a single frame dicom file.

Javadoc failure for files created with XSLT in generated-sources directory

I was starting up with dcm4che again after a few years and was trying to create some Javadoc files. When I tried running man javadoc:javadoc on the modules, I received a long list of errors. I was using Javadoc 8 and many of the problems were due to the information in the javadoc comment related to the schema for the files in the generated-sources sections not having the greater than sign changed to >. I know that Javadoc 8 has a problem with this because it is much stricter on html syntax in the comments. You are using group:javax.xml.bind artifact:jaxb-api version:2.1. According tohttps://jaxb.java.net/2.2.5/docs/release-documentation.html, there was fix between 2.2.3u2 and 2.2.4 that may refer to this.

There are some other Javadoc problems but they appear to be related to the source code.

This is what I received when I ran man javadoc:javadoc
problems.txt


I changed the versions for the following dependencies in dcm4che-audit/pom.xml and that seemed to have removed the problems with the illegal HTML in the Javadoc comments.

javax.xml.bind jaxb-api 2.2.5 junit junit 4.12 jar test

The resulting Javadocs can be found at https://bradleyross.github.io/dcm4che/apidocs

Idle timeout may wrongly expire in case of two consecutive C-MOVE operations

When using the same association for two C-MOVE operations, an idle timeout may expire before the (second) C-MOVE operation is finished.

We are using a Connection in SYNCHRONOUS_MODE, i.e. with maxOpsInvoked = 1, and try to trigger two consecutive C-MOVE operations by calling Association.cmove(String, String, int, Attributes, String, String, DimseRSPHandler). The second call blocks in Association.addDimseRSPHandler(DimseRSPHandler) until the first C-MOVE operation is finished.
As soon as the first C-MOVE operation is finished, a notification is sent out in Association.onDimseRSP(Dimse, Attributes, Attributes). This starts the second C-MOVE operation. After that, an idle timeout is scheduled (in the same method). However, the stopTimeout() method (for stopping the idle timeout) has already been called before the second call to the cmove(...) method has blocked. Therefore, if the second C-MOVE operation takes longer than the idle timeout, the association is wrongly aborted.

dcm4che-conf-core-api jar contains extra classes

The dcm4che-conf-core-api-3.3.8.jar in Maven contains classes for the Apache Commons BeanUtils and Logging library. This can cause problems if an application is using different versions of these libraries.

dcm2jpg throws EOFException when converting deflated explicit VR little endian file

Platform: macOS Sierra 10.12.3
dcm4che version: 3.3.8

To reproduce: convert file with TS explicit VR little endian to deflated using dcm2dcm -t 1.2.840.10008.1.2.1.99 file.dcm file_defl.dcm. Create jpeg file using dcm2jpg file_defl.dcm file.jpg

Result:

Failed to convert file_defl.dcm: null
java.io.EOFException
	at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:353)
	at javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:373)
	at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.readRaster(DicomImageReader.java:295)
	at org.dcm4che3.imageio.plugins.dcm.DicomImageReader.read(DicomImageReader.java:342)
	at org.dcm4che3.tool.dcm2jpg.Dcm2Jpg.readImage(Dcm2Jpg.java:381)
	at org.dcm4che3.tool.dcm2jpg.Dcm2Jpg.convert(Dcm2Jpg.java:360)
	at org.dcm4che3.tool.dcm2jpg.Dcm2Jpg.mconvert(Dcm2Jpg.java:345)
	at org.dcm4che3.tool.dcm2jpg.Dcm2Jpg.main(Dcm2Jpg.java:314)

Does dcm4che's DicomImageReader not support deflated datasets?

LIB-399 Get rid of dangerous SafeClose

The class SafeClose used throughout the library (and the archive) is a bad idea.
It just silently swallows IOExceptions that happen on close of streams/sockets.
But close usually also involves flushing the stream, and if exceptions are ignored for that it could mean that an incomplete object is written to the stream.

It is a better idea to replace all usages of SafeClose with Java 7 try-with-resources statements. (This would require depending on Java 7 for the library. Currently it is still compatible with Java 6.)
Update: The master branch is now on Java 7, so try-with-resources can be used.

(This issue was originally opened in Jira and migrated from there: http://dcm4che.org/jira/browse/LIB-399 )

findscu: Unable to recover non-ASCII text from DICOM attributes

findscu: Unable to recover non-ASCII text from DICOM attributes

Our PACS stores information in several fields encoded as ISO-8859-1 (latin-1). So far, we were able to recover properly this information using dcmqr (from dcm4che2 toolset) but right now we are unable to recover these fields using findscu (from dcm4che3 toolset).

You can find the description of our problem in the last two messages of this (rather old) thread:
http://forums.dcm4che.org/jiveforums/thread.jspa?messageID=18779
Notice that we were able to solve the problem back in 2011 using dcmqr, but we pretend to use the new findscu software in a new project.

Our storage server does not store information about specific character set (the attribute (0008,0005) is empty), so, maybe our PACS server is not perfectly configured. Would it be possible to recover the proper strings using findscu?

Examples:

dcmqr:

$ LANG=es_ES.iso-8859-1 /usr/local/dcm4che/dcm4che2/bin/dcmqr [email protected]:104 -q 00100020='80701'|iconv -f ISO-8859-1 -t UTF8 | grep '(0008,1030)'

(0008,1030) LO #6 [tórax] Study Description
(0008,1030) LO #6 [tórax] Study Description

Perfect!!!

findscu:

$ LANG=es_ES.iso-8859-1 /usr/local/dcm4che/dcm4che3/bin/findscu -b DCMQR -c [email protected]:104 -m 00100020='80701' -m 00080005='ISO-8859-1' | grep '(0008,1030)'

(0008,1030) LO [t�rax] StudyDescription
(0008,1030) LO [t�rax] StudyDescription

I have tried with different locales, as well as using different values for the SpecificCharacterSet attribute, but so far we have been unable to recover correctly any fields containing non-ASCII characters.

Use certficate issued by IHE CA for all tools by default

Certificate[1]:
Owner: CN=dcm4che-tools, O=dcm4che.org, C=AT
Issuer: CN=IHE Europe CA, O=IHE Europe, C=FR
Serial number: 587
Valid from: Sun Apr 02 08:44:33 CEST 2017 until: Fri Apr 02 08:44:33 CEST 2027
Certificate fingerprints:
	 MD5:  E2:19:A3:34:EF:92:97:4C:A2:9A:70:E5:98:78:A2:A8
	 SHA1: D7:5C:5B:EF:CF:A5:BA:37:20:45:C3:74:7A:FF:F4:36:C2:B4:6A:95
	 SHA256: 08:54:62:83:A9:85:B3:0D:1A:19:D7:68:83:D1:03:AF:E4:52:BF:D1:5C:5F:5F:D1:8B:B5:C5:7F:E1:88:2C:9C
	 Signature algorithm name: SHA512withRSA
	 Version: 3

dcm4che can't store a particular CT

when trying to dump:

IOException during read of (7FE0,0010) #524288 @ 1254 java.io.EOFException at org.dcm4che3.util.StreamUtils.readFully(StreamUtils.java:63) at org.dcm4che3.io.DicomInputStream.readFully(DicomInputStream.java:384) at org.dcm4che3.io.DicomInputStream.readValue(DicomInputStream.java:730) at org.dcm4che3.tool.dcmdump.DcmDump.readValue(DcmDump.java:122) at org.dcm4che3.io.DicomInputStream.readAttributes(DicomInputStream.java:516) at org.dcm4che3.io.DicomInputStream.readDataset(DicomInputStream.java:444) at org.dcm4che3.tool.dcmdump.DcmDump.parse(DcmDump.java:87) at org.dcm4che3.tool.dcmdump.DcmDump.main(DcmDump.java:245)

00010ccd.dcm.zip

WADO Implementation

What Interfaces or Methods I need to implement wado service to handle weasis requests in my Spring boot application?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.