如何将dcm4che库导入java项目? [英] How to import dcm4che library to java project?

查看:173
本文介绍了如何将dcm4che库导入java项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 dcm4che 库导入我的java项目,因为我想实现一个非常简单的应用程序,它可以使用这个库。 ( https://github.com/dcm4che/dcm4che

I am trying to import dcm4che library to my java project, because I want to implement a really simple application which will be able to use this library. (https://github.com/dcm4che/dcm4che)

我尝试使用Eclipse,IntelliJ和NetBeans导入这个库。我用maven(mvn install)做了一些魔术。我不知道如何使用它。怎么开始是的,我确实使用了很多谷歌。我是软件开发的初学者,所以也许有一个我不知道的快速简单的解决方案。

I tried to import this library using Eclipse, IntelliJ and NetBeans. I did some magic with maven (mvn install). And I don't know how to use it. How to begin. Yes, I did use google a lot. I am a beginner in software development so maybe there is a quick and simple solution which I don't know about.

推荐答案

使用Apache Maven当然是最好和最简单的选择。您需要将dcm4che存储库以及dcm4che依赖项添加到您的pom中(请参阅下面的详细信息)。

Using Apache Maven is of course the best and easiest option. You will need to add the dcm4che repository as well as the dcm4che dependencies into your pom (see details below).

准备好pom后,确保所有内容都通过'mvn clean install'进行编译。在应用程序的类中适当地导入所需的类。

Once you have the pom ready, make sure everything compiles by a 'mvn clean install'. Import the required classes appropriately inside your application's classes.

将存储库添加到pom:

Add repository to the pom:

<repositories>
<repository>
    <id>www.dcm4che.org</id>
    <name>dcm4che Repository</name>
    <url>http://www.dcm4che.org/maven2</url>
</repository>
</repositories>

向pom添加依赖:

<dependency> 
    <groupId>dcm4che</groupId>
    <artifactId>dcm4che-core</artifactId>
    <version>2.0.29</version>
</dependency>

这篇关于如何将dcm4che库导入java项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆