Reputation: 352
I want to use the dcm2json tool, part of the dcm4che3 toolkit, but I cannot figure out how to compile and execute the command line tool. Having run
$ git clone https://github.com/dcm4che/dcm4che.git
$ cd dcm4che
$ mvn install
in the dcm4che directory root as outlined in the installation manual, all I get from compilation is a jar dcm4che/dcm4che-tool/dcm4che-tool-dcm2json/target/dcm4che-tool-dcm2json-3.3.5-SNAPSHOT.jar and a class file dcm4che/dcm4che-tool/dcm4che-tool-dcm2json/target/classes/org/dcm4che3/tool/dcm2json/Dcm2Json.class. There is no tool to execute. I can execute the standalone tools downloaded from http://sourceforge.net/projects/dcm4che/files/dcm4che3/3.3.3/ but sadly dcm2json isn't included in this (most recent sourceforge) release.
Does anyone know from where I can download a dcm2json executable or how to compile it? Any help would be really, really appreciated.
(Yes I did Google. A lot.)
Upvotes: 3
Views: 2967
Reputation: 4233
dcm4che project has a sub-project called dcm4che-assembly
that after running mvn install
on the parent dcm4che
project, produces a zip that assembles all runnable artifacts, including dcm2json
.
If you are curious about how you can get the sh/bat script to run it, then dcm4che-assembly
is where you have to look.
In fact, this zip assembly is the same as you download in the binary package.
Hope it helps!
Upvotes: 3
Reputation: 145
I was also curious about this, so I investigated it some. I don't have a final answer, but I'll post what I've found so far in the hopes that it'll be useful to someone else, and might be the first step to an answer.
It seems that mvn install
, after it does its thing, puts a whole bunch of stuff in ~/.m2
. The jar files in there don't seem to run as you might expect, and based on the files in the git repo in dcm4che-assembly/src/bin
, it seems they need a wrapper to run right. My preliminary toying with the wrappers doesn't seem to work—I get errors like the following:
Error: Could not find or load main class org.dcm4che3.tool.dcm2json.Dcm2Json
These wrapper files really seem to want to be installed somewhere (like /usr/local/bin
?), but they do not seem to be.
On the other hand, more recent binaries are now available (currently up through 3.3.7
, while git is 3.3.8-SNAPSHOT
), and I'm able to use the dcm2json
tool available in those. Interestingly, that executable is also a wrapper, nearly identical to the one in git. Further investigation of why it works and the one it git doesn't may lead to an answer of why the dcm4dch3 tools don't magically run after being installed.
And of course the key lies in understanding how the maven framework works.
Upvotes: 0