计划使用java实现一个Java的脱敏工具
GUI界面使用JavaFX
POM引用,最重要的是引入dcm4chee-core 的包来帮助我们读写Dicom文件
<dependency>
<groupId>dcm4che</groupId>
<artifactId>dcm4che-core</artifactId>
<version>2.0.26</version>
</dependency>
GUI界面实现:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextArea?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<GridPane alignment="center" hgap="10" vgap="10" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="net.lainiao.dicom.ui.MainController">
<columnConstraints>
<ColumnConstraints />
<ColumnConstraints />
</columnConstraints>
<rowConstraints>
<RowConstraints />
<RowConstraints />
</rowConstraints>
<children>
<AnchorPane prefHeight="594.0" prefWidth="768.0">
<children>
<Button fx:id="btnSelectSource" layoutX="30.0" layoutY="13.0" mnemonicParsing="false" onAction="#btnSelectSourceAction" text="Select File (Zip,Rar,Dicom)" />
<Label fx:id="txtSource" layoutX="200.0" layoutY="17.0" prefHeight="15.0" prefWidth="628.0" text="Select File Path" textFill="#e43939" />
<Button fx:id="btnSelectTemp" layoutX="30.0" layoutY="48.0" mnemonicParsing="false" onAction="#btnSelectTempAction" text="Select Temp directory" />
<Label fx:id="txtTemp" layoutX="200.0" layoutY="52.0" prefHeight="15.0" prefWidth="628.0" text="Temporary file directory" textFill="#e43939" />
<Button fx:id="btnSelectTarget" layoutX="30.0" layoutY="81.0" mnemonicParsing="false" onAction="#btnSelectTargetAction" text="Select output directory" />
<Label fx:id="txtTarget" layoutX="200.0" layoutY="85.0" prefHeight="15.0" prefWidth="628.0" text="Output file directory" textFill="#e43939" />
<Button fx:id="btnStart" layoutX="374.0" layoutY="115.0" mnemonicParsing="false" onAction="#btnStartAction" prefHeight="52.0" prefWidth="173.0" text="Start" />
<Button fx:id="btnEnd" layoutX="588.0" layoutY="115.0" mnemonicParsing="false" onAction="#btnEndAction" prefHeight="52.0" prefWidth="173.0" text="Exit" />
<TextArea fx:id="txtInfo" layoutX="30.0" layoutY="173.0" prefHeight="200.0" prefWidth="747.0" wrapText="true" />
<TextArea fx:id="txtError" layoutX="30.0" layoutY="384.0" prefHeight="200.0" prefWidth="747.0" style="-fx-text-fill: red" wrapText="true" />
<CheckBox fx:id="cbFilter" layoutX="30.0" layoutY="119.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="343.0" text="Each Study keeps only the sequence with the most files" />
<CheckBox fx:id="cbFilter1" layoutX="30.0" layoutY="145.0" mnemonicParsing="false" prefHeight="16.0" prefWidth="343.0" text="Original Catalog Override" />
</children>
</AnchorPane>
</children>
</GridPane>
GUI界面效果图: