查看: 1074|回复: 0

[Java语言] Java实现解析dcm医学影像文件并提取文件信息的方法示例

发表于 2018-5-2 08:00:01

本文实例讲述了Java实现解析dcm医学影像文件并提取文件信息的方法。分享给大家供大家参考,具体如下:

一、安装

首先去Github 下载源码,然后执行mvn install进行本地安装,Maven中央仓库,竟然没有该jar。。安装成功之后如下:

然后在POM.XML文件中引入该jar包:

  1. <dependency>
  2. <groupId>org.dcm4che</groupId>
  3. <artifactId>dcm4che-core</artifactId>
  4. <version>3.3.2</version>
  5. </dependency>
复制代码

二、测试类

  1. /**
  2. * projectName: xxx
  3. * fileName: DisplayTag.java
  4. * packageName: com.xxxx.xxxx.common.util
  5. * date: 2018-03-26 10:07
  6. * copyright(c) 2017-2020 xxx公司
  7. */
  8. package com.gz.medicine.common.util;
  9. import java.awt.image.Raster;
  10. import java.io.File;
  11. import java.io.IOException;
  12. import java.sql.Time;
  13. import java.util.Arrays;
  14. import java.util.Date;
  15. import java.util.logging.Level;
  16. import java.util.logging.Logger;
  17. import org.dcm4che3.data.Attributes;
  18. import org.dcm4che3.data.ElementDictionary;
  19. import org.dcm4che3.data.Fragments;
  20. import org.dcm4che3.data.Sequence;
  21. import org.dcm4che3.data.Tag;
  22. import org.dcm4che3.data.VR;
  23. import org.dcm4che3.io.DicomEncodingOptions;
  24. import org.dcm4che3.io.DicomInputStream;
  25. import org.dcm4che3.io.DicomOutputStream;
  26. import org.dcm4che3.util.SafeClose;
  27. import java.awt.image.Raster;
  28. import java.io.IOException;
  29. import java.util.Arrays;
  30. /**
  31. * @version: V1.0
  32. * @author: fendo
  33. * @className: DisplayTag
  34. * @packageName: com.xxxx.xxxx.common.util
  35. * @description: Tag解析
  36. * @data: 2018-03-26 10:07
  37. **/
  38. public final class DisplayTag {
  39. private static Attributes obj=null, object =null;
  40. private static DicomInputStream din;
  41. private static double resultFactorDix;
  42. private String result = null;
  43. private Double result2 = null;
  44. private String nom = null;
  45. private String nounString = null;
  46. private int val2 = 0;
  47. private int valeurReturn;
  48. private String nounUnit = null;
  49. private static double resultFacteurDix = 0;
  50. private Double valueSpatial = null;
  51. private String nounUnitRatio = null;
  52. private DicomInputStream dis;
  53. private static final char[] HEX_DIGITS = {
  54. '0' , '1' , '2' , '3' , '4' , '5' ,
  55. '6' , '7' , '8' , '9' , 'A' , 'B' ,
  56. 'C' , 'D' , 'E' , 'F'
  57. };
  58. private DicomEncodingOptions encOpts = DicomEncodingOptions.DEFAULT;
  59. private static ElementDictionary dict = ElementDictionary.getStandardElementDictionary();
  60. public DisplayTag(File file ){
  61. try {
  62. setObject(loadDicomObject(file) );
  63. } catch (IOException ex) {
  64. Logger.getLogger(DisplayTag.class.getName()).log(Level.SEVERE, null, ex);
  65. }
  66. }
  67. /**
  68. * Read metadata of Dicom 3.0
  69. * @param f : input file
  70. * @return Attributes
  71. * @throws IOException
  72. */
  73. public static Attributes loadDicomObject(File f) throws IOException {
  74. if (f == null){
  75. return null;
  76. }else{
  77. DicomInputStream dis = new DicomInputStream(f);
  78. //attr.setSpecificCharacterSet("GBK");
  79. return dis.readDataset(-1, -1);
  80. }
  81. }
  82. /**
  83. * Put attribut
  84. * @param obj
  85. */
  86. public void setObject(Attributes obj){
  87. this.obj = obj;
  88. }
  89. /**
  90. * Giving attribut of metadata
  91. * @return
  92. */
  93. public static Attributes getObject(){
  94. return obj;
  95. }
  96. /**
  97. * Display metadata
  98. * @param file : file inout
  99. * @throws IOException
  100. */
  101. public String readTagDicom(File file) throws IOException{
  102. din = new DicomInputStream(file);
  103. object = din.readFileMetaInformation() ;
  104. String value = object.toString();
  105. object = din.readDataset(-1, -1);
  106. return value;
  107. }
  108. /**
  109. * Permet d'afficher l'heure d'une valeur dicom en standard international yyyy.mm.dd/ Permit display time in format yyyy.mm.dd
  110. * @param Tag : valeur du tag / int tag
  111. * @param valueBool : si true Format yyyy.mm.dd sinon format dd.mm.yyyy/ if true then format yyyy.mm.dd else dd.mm.yyyy
  112. * @param valueNoun : "dot" mettre la date en format yyyy.mm.dd ou dd.mm.yyyy sinon en format yyyy mm dd ou dd mm yyyy/ "dot" put yyyy.mm.dd or dd.mm.dd or dd.mm.yyyy else yyyy mm or dd mm yyyy
  113. * @return afficher le string du tag selon le standard international/ return string Date
  114. * @throws IOException
  115. */
  116. public String dicomDate(int Tag,boolean valueBool, String valueNoun) throws IOException{
  117. if(getObject().contains(Tag)==true ){
  118. String tagValue = getObject().getString(Tag);
  119. String tagDayFomat = FormatDate(tagValue,valueBool,valueNoun);
  120. return tagDayFomat;
  121. }else{
  122. return null;
  123. }
  124. }
  125. /**
  126. * Permet d'afficher l'heure d'une valeur dicom en standard international yyyy.mm.dd/ Permit display a time in metadata for yyyy.mm.dd
  127. * @param object
  128. * @param Tag : valeur du tag/ value of tag
  129. * @param valueBool : si true Format yyyy.mm.dd sinon format dd.mm.yyyy/ if true format yyyy.mm.dd else dd.mm.yyyy
  130. * @param valueNoun : "dot" mettre la date en format yyyy.mm.dd ou dd.mm.yyyy sinon en format yyyy mm dd ou dd mm yyyy/dot" put yyyy.mm.dd or dd.mm.dd or dd.mm.yyyy else yyyy mm or dd mm yyyy
  131. * @return afficher le string du tag selon le standard international/ return string date
  132. * @throws IOException
  133. */
  134. public static String dicomDate(Attributes object , int Tag,boolean valueBool, String valueNoun) throws IOException{
  135. String tagValue = object.getString(Tag);
  136. String tagDayFomat = FormatDate(tagValue,valueBool,valueNoun);
  137. return tagDayFomat;
  138. }
  139. /**
  140. * Format tag
  141. * @param Numero : String date
  142. * @param valueBool : if true Format yyyy.mm.dd else format dd.mm.yyyy
  143. * @param valueNoun : "dot" put the date in format yyyy.mm.dd or dd.mm.yyyy else in format yyyy mm dd or dd mm yyyy
  144. * @return
  145. */
  146. public static String FormatDate(String Numero, boolean valueBool,String valueNoun) {
  147. if (Numero.matches("^[0-9]*$")) {//If la chaine de caractère est un nombre ou un chiffre
  148. StringBuffer r = new StringBuffer();
  149. if (valueBool ==true){//Format yyyy.mm.dd
  150. for (int i = 0, j = Numero.length(); i < j; i++) {
  151. r.append(Numero.charAt(i));
  152. if ((i == 3)||(i == 5) ){
  153. if(valueNoun == null ? "dot" == null : valueNoun.equals("dot")){
  154. r.append('.');
  155. }else{
  156. r.append(' ');
  157. }
  158. }
  159. }
  160. return r.toString();
  161. }else{
  162. for (int i = 6, j =8; i<j; i++) {//jours
  163. r.append(Numero.charAt(i));
  164. if(i ==7 ){
  165. if(valueNoun == null ? "dot" == null : valueNoun.equals("dot")){
  166. r.append('.');
  167. }else{
  168. r.append(' ');
  169. }
  170. }
  171. }
  172. for (int i = 4, j =6; i<j; i++) {
  173. r.append(Numero.charAt(i));//The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.
  174. if(i ==5 ){
  175. if(valueNoun == null ? "dot" == null : valueNoun.equals("dot")){
  176. r.append('.');
  177. }else{
  178. r.append(' ');
  179. }
  180. }
  181. }
  182. for (int i = 0, j =4; i<j; i++) {
  183. r.append(Numero.charAt(i));//The first char value of the sequence is at index zero, the next at index one, and so on, as for array indexing.
  184. }
  185. return r.toString();
  186. }
  187. }
  188. return Numero;
  189. }
  190. /**
  191. * Read value tag of VR = DA
  192. *
  193. * If use setDicomObject(readDicomObject(File f)), and getHeaderDateValue(getDicomObject())
  194. * @param tagNr "0000,0010"
  195. * @return
  196. */
  197. public Date getHeaderDateValue(String tagNr) {
  198. return getHeaderDateValue(toTagInt(tagNr));
  199. }
  200. /**
  201. * Read value tag of VR = DA
  202. *
  203. * @param tagNr see dcm4che2
  204. * @return
  205. */
  206. public Date getHeaderDateValue(int tagNr) {
  207. return getObject().getDate(tagNr);
  208. }
  209. /**
  210. * Converts the string representation of a header number
  211. * e.g. 0008,0010 to the corresponding integer as 0x00080010
  212. * as used in the @see org.dcm4che2.data.Tag
  213. * @param headerNr e.g. 0008,0010
  214. * @return 0x00080010 as int
  215. */
  216. public static int toTagInt(String headerNr){
  217. return Integer.parseInt(headerNr.replaceAll(",", ""), 16);
  218. }
  219. /**
  220. * Read value tag of VR = DA
  221. * @param tagNr
  222. * @param dicomObj
  223. * @return
  224. */
  225. public Date getHeaderDateValue(int tagNr,Attributes dicomObj) {
  226. return dicomObj.getDate(tagNr);
  227. }
  228. /**
  229. * Read value tag of VR = DA
  230. * @param tagNr :"0000,0010"
  231. * @param dicomObj
  232. * @return
  233. */
  234. public Date getHeaderDateValue(String tagNr,Attributes dicomObj) {
  235. return getHeaderDateValue(toTagInt(tagNr), dicomObj);
  236. }
  237. /**
  238. * Remove string ^ in file dicom
  239. * @param num
  240. * @return
  241. */
  242. public static String texteDicom(String num) {
  243. num = num.replaceAll("\\^+", " ");
  244. return num;
  245. }
  246. /**
  247. * Convertor tag to String
  248. * Using VM !=1
  249. * example result [25, 25]
  250. * @param Tag
  251. * @return
  252. */
  253. public static String getStringTag(Attributes object, int Tag){
  254. String tagValue2[] = object.getStrings(Tag);//Conversion table in List to String
  255. String tagValue = Arrays.asList(tagValue2).toString();
  256. return tagValue;
  257. }
  258. /**
  259. * Convertor tag to String
  260. * Using VM !=1
  261. * example result 25/25
  262. * @param object
  263. * @param Tag
  264. * @return
  265. */
  266. public static String getStringTag2(Attributes object, int Tag){
  267. String tagValue2[] = object.getStrings(Tag);//Conversion table in List to String
  268. String tagValue =DisplayTag.arrayToString(tagValue2,"\\");
  269. return tagValue;
  270. }
  271. /**
  272. * Convert an array of strings to one string
  273. * Put the 'separator' string between each element
  274. * @param a
  275. * @param separator
  276. * @return
  277. */
  278. public static String arrayToString(String[] a, String separator){
  279. StringBuffer result = new StringBuffer();
  280. if(a.length>0) {
  281. result.append(a[0]);
  282. for(int i=1;i<a.length;i++){
  283. result.append(separator);
  284. result.append(a[i]);
  285. }
  286. }
  287. return result.toString();
  288. }
  289. /**
  290. * Permit display time in hh.mm.ss
  291. * (0008,0030) AT S Study Time
  292. * (0008,0031) AT S Series Time
  293. * (0008,0032) AT S Acquisition Time
  294. * (0008,0033) AT S Image Time
  295. * @param Tag : giving tag
  296. * @return
  297. * @throws IOException
  298. */
  299. public String dicomTime(int Tag) throws IOException{
  300. if(getObject().contains(Tag)==true ){
  301. String tagValue = getObject().getString(Tag);
  302. String tagValueNotDot = formatNotDot(tagValue);
  303. String tagTimeFomat = FormatTimes(tagValueNotDot);
  304. return tagTimeFomat;
  305. } else {
  306. return null;
  307. }
  308. }
  309. /**
  310. * Permit display time in hh.mm.ss.fac
  311. * (0008,0030) AT S Study Time
  312. * (0008,0031) AT S Series Time
  313. * (0008,0032) AT S Acquisition Time
  314. * (0008,0033) AT S Image Time
  315. * @param Tag : giving tag
  316. * @return
  317. * @throws IOException
  318. */
  319. public String dicomTimeTotal( int Tag) throws IOException{
  320. if(getObject().contains(Tag)==true ){
  321. String tagValue = getObject().getString(Tag);
  322. String tagTimeFomat = FormatTimes(tagValue);
  323. return tagTimeFomat;
  324. } else {
  325. return null;
  326. }
  327. }
  328. /**
  329. * Permit display time in hh.mm.ss
  330. * (0008,0030) AT S Study Time
  331. * (0008,0031) AT S Series Time
  332. * (0008,0032) AT S Acquisition Time
  333. * (0008,0033) AT S Image Time
  334. * @param object : Metadata
  335. * @param Tag : value dicom
  336. * @return new value String
  337. * @throws IOException
  338. */
  339. public String dicomTime2(Attributes object, int Tag) throws IOException{
  340. String tagValue = object.getString(Tag);
  341. String tagValueNotDot = formatNotDot(tagValue);
  342. System.out.println(FormatTime(tagValueNotDot));
  343. String tagTimeFomat = FormatTimes(tagValueNotDot);
  344. return tagTimeFomat;
  345. }
  346. /**
  347. * Permit display time in hh.mm.ss.frac
  348. * (0008,0030) AT S Study Time
  349. * (0008,0031) AT S Series Time
  350. * (0008,0032) AT S Acquisition Time
  351. * (0008,0033) AT S Image Time
  352. * @param object : Metadata
  353. * @param Tag : value dicom
  354. * @return new value String
  355. * @throws IOException
  356. */
  357. public String dicomTime3(Attributes object, int Tag) throws IOException{
  358. String tagValue = object.getString(Tag);
  359. String tagTimeFomat = FormatTimes(tagValue);
  360. return tagTimeFomat;
  361. }
  362. /**
  363. * reads a int value from the Dicomheader
  364. * @param tagNr the Tag to read
  365. * @return the value as int
  366. */
  367. public int getHeaderIntegerValue(int tagNr) {
  368. return getObject().getInt(tagNr,0);
  369. }
  370. /**
  371. *
  372. * @param tagNr e.g. "0018,0050" to get Slice Thickness<br>
  373. * or "0008,0102#0054,0220" to get the Coding Scheme Designator after View Code Sequence
  374. * @return int
  375. */
  376. public int getHeaderIntegerValue(String tagNr) {
  377. return getHeaderIntegerValue(toTagInt(tagNr));
  378. }
  379. /**
  380. * checks if the Header contains the given tag
  381. * @param tagNr
  382. * @return
  383. */
  384. public boolean containsHeaderTag(String tagNr) {
  385. return containsHeaderTag(toTagInt(tagNr));
  386. }
  387. /**
  388. * checks if the Header contains the given tag
  389. * @param tagNr
  390. * @return
  391. */
  392. public boolean containsHeaderTag(int tagNr) {
  393. return getObject().contains(tagNr);
  394. }
  395. /**
  396. * returns the name of the given Tag
  397. * @param tagNr
  398. * @return
  399. */
  400. public static String getHeaderName(int tagNr) {
  401. return dict.keywordOf(tagNr);
  402. }
  403. /**
  404. * returns the name of the given Header field
  405. * @param tagNr
  406. * @return the name of the Field e.g. Patients Name
  407. */
  408. public String getHeaderName(String tagNr) {
  409. try {
  410. return getHeaderName(toTagInt(tagNr));
  411. } catch (Exception e) {
  412. return "";
  413. }
  414. }
  415. /**
  416. * returns the String representation of the given header field
  417. * if it exists in the header
  418. * @param tagNr
  419. * @return
  420. */
  421. public String getHeader(int tagNr) {
  422. try {
  423. String dcmele = getObject().getString(tagNr);
  424. return toElementString(dcmele, tagNr);
  425. } catch (Exception e) {
  426. return "";
  427. }
  428. }
  429. private static String toElementString(String dcmele,int tag) {
  430. StringBuffer sb = new StringBuffer();
  431. int TAG[] = getObject().tags();
  432. StringBuffer append = sb.append(TAG)
  433. .append(" [").append(getObject().getVR(tag)).append("] ")
  434. .append(object.tags()).append(": ")
  435. .append(dcmele);
  436. return sb.toString();
  437. }
  438. /**
  439. * checks wether the header is empty or not
  440. * @return
  441. */
  442. public boolean isEmpty() {
  443. if (getObject() == null || getObject().isEmpty()) {
  444. return true;
  445. }
  446. return false;
  447. }
  448. /**
  449. * Converts the string representation of a header number
  450. * e.g. 0008,0010 to the corresponding integer as 0x00080010
  451. * as used in the @see org.dcm4che2.data.Tag
  452. * @param headerNr e.g. 0008,0010
  453. * @return 0x00080010 as int
  454. */
  455. public static int toTagInt2(String headerNr){
  456. return Integer.parseInt(headerNr.replaceAll(",", ""), 16);
  457. }
  458. /**
  459. * Removing comma in String
  460. * @param num
  461. * @return
  462. */
  463. public static String formatNotDot(String num) {
  464. num = num.trim().replaceAll("[^0-9\\+]", "");
  465. if (num.matches("^0*$")){
  466. num = "";
  467. }
  468. return num;
  469. }
  470. /**
  471. * Format
  472. * hh.mm.ss
  473. * @param Numero
  474. * @return
  475. */
  476. public static String FormatTime(String Numero) {
  477. if (Numero.matches("^[0-9]*$")) {
  478. StringBuilder r = new StringBuilder();
  479. for (int i = 0, j = 6; i < j; i++) {
  480. r.append(Numero.charAt(i));
  481. if ((i % 2 == 1) && (i < (j - 1))){
  482. r.append(':');
  483. }
  484. }
  485. return r.toString();
  486. }
  487. return Numero;
  488. }
  489. /**
  490. * Format
  491. * hh.mm.ss.frac
  492. * @param Numero
  493. * @return
  494. */
  495. public static String FormatTimes(String Numero) {
  496. if (Numero.matches("^[0-9].*$")) {
  497. StringBuilder r = new StringBuilder();
  498. for (int i = 0,j=Numero.length();i<j; i++) {
  499. r.append(Numero.charAt(i));
  500. if ((i % 2 == 1)&(i<5)){
  501. r.append(':');
  502. }
  503. }
  504. return r.toString();
  505. }
  506. return Numero;
  507. }
  508. /**
  509. * Round double after dot
  510. * @param a : value convertor
  511. * @param n number of decade
  512. * @return new value
  513. */
  514. public double floor(double a, int n){
  515. double p =Math.pow(10.0,n);
  516. return Math.floor((a*p)+0.5)/p;
  517. }
  518. /**
  519. * Giving power
  520. * Example:
  521. * setFactorPower(10,2)//10^2
  522. * @param result3
  523. * @param factor
  524. * @return
  525. * @return
  526. */
  527. public static double setFactorPower(double result3, double factor){
  528. return resultFactorDix= Math.pow(result3, factor);
  529. }
  530. /**
  531. * Giving getFactorPower
  532. */
  533. public static double getFactorPower(){
  534. return resultFactorDix;
  535. }
  536. /**
  537. * Giving pixelData
  538. * @param dcmObj
  539. * @return
  540. */
  541. public static int[] lattricePixelData(Attributes dcmObj){
  542. int[] data = dcmObj.getInts(Tag.PixelData);
  543. return data;
  544. }
  545. /**
  546. * Giving pixel data
  547. * @return
  548. * @throws IOException
  549. */
  550. public int[] lattricePixelData2() throws IOException{
  551. int[] data = getObject().getInts(Tag.PixelData);
  552. return data;
  553. }
  554. /**
  555. * Giving pixel data
  556. * @param dcmObj
  557. * @return
  558. * @throws IOException
  559. */
  560. public byte[] lattricePixelDataBytes(Attributes dcmObj) throws IOException{
  561. byte[] data = dcmObj.getBytes(Tag.PixelData);
  562. return data;
  563. }
  564. /**
  565. * Giving pixel data
  566. * @return
  567. * @throws IOException
  568. */
  569. public byte[] lattricePixelDataBytes2() throws IOException{
  570. byte[] data = getObject().getBytes(Tag.PixelData);
  571. return data;
  572. }
  573. /**
  574. * Extraction PixelData
  575. * @param raster of dicom
  576. * @return
  577. */
  578. private int[][] extractData(Raster raster) {
  579. int w = raster.getWidth();
  580. int h = raster.getHeight();
  581. System.out.printf("w = %d h = %d%n", w, h);
  582. //WritableRaster raster = (WritableRaster) getMyImage();
  583. int[][] data = new int[h][w];
  584. for (int y = 0; y < h; y++) {
  585. for (int x = 0; x < w; x++) {
  586. data[y][x] =raster.getSample(x, y, 0);
  587. }
  588. }
  589. return data;
  590. }
  591. /**
  592. * Extraction PixelData
  593. * @return
  594. */
  595. private int[] getPixelData(int[][] data2){
  596. int h = data2.length;
  597. int w = data2[0].length;
  598. int[] array = new int[h*w];
  599. for(int y = 0; y < h; y++) {
  600. for(int x = 0; x < w; x++) {
  601. int index = y*w + x;
  602. array[index] = data2[y][x];//ligne
  603. }
  604. }
  605. return array;
  606. }
  607. /**
  608. * Return value table input
  609. * @param object
  610. * @param PATIENT_ADDITIONAL_TAGS : Table int
  611. *
  612. * example :
  613. * public static final int[] tag = {
  614. 0x00080020,
  615. 0x00080022,
  616. };
  617. *
  618. *FileInputStream fis = new FileInputStream(fileInput);
  619. *DicomInputStream dis = new DicomInputStream(fis);
  620. *DicomObject obj = dis.readDicomObject();
  621. *String nounValue[] =getValue(obj,tag);
  622. *
  623. * @return
  624. */
  625. private static String[] getValue(Attributes object, int[] PATIENT_ADDITIONAL_TAGS){
  626. String [] value = new String [PATIENT_ADDITIONAL_TAGS.length];
  627. int i =0;
  628. while (i<PATIENT_ADDITIONAL_TAGS.length){
  629. for (int tag : PATIENT_ADDITIONAL_TAGS) {
  630. value[i]=object.getString(tag);
  631. i++;
  632. }
  633. //System.out.print(value[0]+"\n");
  634. //System.out.print(value[1]);
  635. }
  636. return value;
  637. }
  638. /**
  639. * Reading VR = SQ
  640. *
  641. * @param inputFile : File
  642. * @param tag : VR =SQ
  643. * @return
  644. */
  645. public String[] readItem (File inputFile, int tag){
  646. DisplayTag dcm = new DisplayTag(inputFile);
  647. Sequence seq= dcm.getObject().getSequence(tag);
  648. String valueString[] = new String[seq.size()];
  649. for (int i = 0; i<seq.size(); i++){
  650. Attributes attr = seq.get(i);
  651. valueString[i] = attr.toString();
  652. }
  653. return valueString;
  654. }
  655. /**
  656. * Value inside VR = SQ
  657. * @param inputFile : input File
  658. * @param tagSQ : tag VR = SQ
  659. * @param tag : Tag inside VR= SQ
  660. * @return
  661. */
  662. public String tagItem(File inputFile, int tagSQ, int tag){
  663. String valueString = null;
  664. DisplayTag dcm = new DisplayTag(inputFile);
  665. Sequence seq= dcm.getObject().getSequence(tagSQ);
  666. Attributes attr = seq.get(0);
  667. valueString = attr.getString(tag);
  668. return valueString;
  669. }
  670. /**
  671. * Les unités spécifiques selon les tags pour vr= SQ/ Unity specical for tags VR= SQ
  672. * @param TAG :
  673. * - RegionSpatialFormat
  674. * - RegionDataType
  675. * - PhysicalUnitsXDirection
  676. * - PhysicalUnitsXDirection
  677. * - PixelComponentPhysicalUnits
  678. *
  679. *
  680. *
  681. * @param result : value string
  682. */
  683. public void unit(int TAG, String result){
  684. if (TAG == Tag.RegionSpatialFormat ){
  685. val2= Integer.valueOf(result).intValue();//convertie en int
  686. switch(val2)
  687. {
  688. case 5:
  689. setNounUnit("Graphics");
  690. break;
  691. case 4:
  692. setNounUnit("Wave form(physiological traces, doppler traces,...");
  693. break;
  694. case 3:
  695. setNounUnit("Spectral(CW or PW Doppler");
  696. break;
  697. case 2:
  698. this.setNounUnit("M-Mode(tissue or flow)");
  699. break;
  700. case 1:
  701. this.setNounUnit("2D(tissue or flow");
  702. break;
  703. case 0:
  704. setNounUnit("None or not applicable");
  705. break;
  706. default:
  707. break;
  708. }
  709. }else if (TAG == Tag.RegionDataType ){
  710. val2= Integer.valueOf(result).intValue();//convertie en int
  711. switch(val2)
  712. {
  713. case 12:
  714. setNounUnit("Orther Physiological(Amplitude vs. Time)");
  715. break;
  716. case 11:
  717. setNounUnit("d(area)/dt");
  718. break;
  719. case 10:
  720. setNounUnit("Area Trace");
  721. break;
  722. case 9:
  723. setNounUnit("d(Volume)/dt Trace");
  724. break;
  725. case 8:
  726. setNounUnit("Volume Trace");
  727. break;
  728. case 7:
  729. setNounUnit("Doppler Max Trace");
  730. break;
  731. case 6:
  732. this.setNounUnit("Doppler Mode Trace");
  733. break;
  734. case 5:
  735. this.setNounUnit("Doppler Mean Trace");
  736. break;
  737. case 4:
  738. setNounUnit("CW Spectral Doppler");
  739. break;
  740. case 3:
  741. this.setNounUnit("PW Spectral Doppler");
  742. break;
  743. case 2:
  744. this.setNounUnit("Color Flow");
  745. break;
  746. case 1:
  747. this.setNounUnit("Tissue");
  748. break;
  749. case 0:
  750. this.setNounUnit("None or not applicable");
  751. break;
  752. default:
  753. break;
  754. }
  755. switch (result) {
  756. case "A":
  757. this.setNounUnit("ECG Trace");
  758. break;
  759. case "B":
  760. this.setNounUnit("Pulse Trace");
  761. break;
  762. case "C":
  763. this.setNounUnit("Phonocardiogram Trace");
  764. break;
  765. case "D":
  766. this.setNounUnit("Gray bar");
  767. break;
  768. case "E":
  769. this.setNounUnit("Color bar");
  770. break;
  771. case "F":
  772. this.setNounUnit("Integrated Backscatter");
  773. break;
  774. default:
  775. return;
  776. }
  777. }else
  778. if (TAG == Tag.PhysicalUnitsXDirection || TAG == Tag.PhysicalUnitsXDirection || TAG == Tag.PixelComponentPhysicalUnits){
  779. val2= Integer.valueOf(result).intValue();//convertie en int
  780. switch(val2)
  781. {
  782. case 9:
  783. setNounUnit("cm*cm.pixel/sec");
  784. break;
  785. case 8:
  786. setNounUnit("cm*cm/pixel");
  787. break;
  788. case 7:
  789. setNounUnit("cm*pixel/sec");
  790. break;
  791. case 6:
  792. this.setNounUnit("dB*pixel/seconds");
  793. break;
  794. case 5:
  795. this.setNounUnit("hertz/pixel");
  796. break;
  797. case 4:
  798. setNounUnit("seconds/pixel");
  799. break;
  800. case 3:
  801. this.setNounUnit("cm/pixel");
  802. break;
  803. case 2:
  804. this.setNounUnit("dB/pixel");
  805. break;
  806. case 1:
  807. this.setNounUnit("percent/pixel");
  808. break;
  809. case 0:
  810. this.setNounUnit("None or not applicable");
  811. break;
  812. default:
  813. break;
  814. }
  815. switch (result) {
  816. case "A":
  817. this.setNounUnit("cm*cm*cm/pixel");
  818. break;
  819. case "B":
  820. this.setNounUnit("cm*cm*cm*pixel/sec");
  821. break;
  822. case "C":
  823. this.setNounUnit("degrees");
  824. break;
  825. }
  826. }else if (TAG == Tag.PixelComponentDataType ){
  827. val2= Integer.valueOf(result).intValue();//convertie en int
  828. switch(val2)
  829. {
  830. case 9:
  831. setNounUnit("Computed Border");
  832. break;
  833. case 8:
  834. setNounUnit("Integrated Backscatter");
  835. break;
  836. case 7:
  837. setNounUnit("Color bar");
  838. break;
  839. case 6:
  840. this.setNounUnit("Gray bar");
  841. break;
  842. case 5:
  843. this.setNounUnit("Color Flow Intensity");
  844. break;
  845. case 4:
  846. setNounUnit("Color Flow Variance");
  847. break;
  848. case 3:
  849. this.setNounUnit("Color Flow Velocity");
  850. break;
  851. case 2:
  852. this.setNounUnit("Spectral doppler");
  853. break;
  854. case 1:
  855. this.setNounUnit("Tissue");
  856. break;
  857. case 0:
  858. this.setNounUnit("None or not applicable");
  859. break;
  860. default:
  861. break;
  862. }
  863. if("A".equals(result)){
  864. this.setNounUnit("Tissue Classification");
  865. }
  866. }
  867. else {
  868. this.setNounUnit("None or not applicable");
  869. }
  870. }
  871. /**
  872. * Enregistre l'unité des items/ Put unity of items
  873. * @param nounUnit
  874. * @return this.nounUnit = nounUnit
  875. */
  876. public String setNounUnit(String nounUnit){
  877. return this.nounUnit = nounUnit;
  878. }
  879. /**
  880. * On obtient l'unité des items./Giving unity of items
  881. * @return le nom de l'unité
  882. */
  883. public String getNounUnit(){
  884. return nounUnit;
  885. }
  886. /**
  887. * Special Ratio Spatial toutes les unites sont en mm/ Giving tag ratio Spatial of mm
  888. * @param TAG : entree choisi
  889. * - PhysicalUnitsXDirection
  890. * - PhysicalUnitsYDirection
  891. * -PixelComponentPhysicalUnits
  892. *
  893. * @param result: prend l'unite
  894. */
  895. public void unitRatioSpatial(int TAG, String result){
  896. if (TAG == Tag.PhysicalUnitsXDirection || TAG == Tag.PhysicalUnitsYDirection || TAG == Tag.PixelComponentPhysicalUnits){
  897. val2= Integer.valueOf(result).intValue();//convertie en int
  898. switch(val2)
  899. {
  900. case 9:
  901. Double valueSpatial1 = getValeurTagItemDoubleRatio()* setFacteurPuissance(10,1);
  902. setTagItemDoubleRatio(valueSpatial1);//prend la valeur
  903. setNounUnitRatio("mm*mm.pixel/sec");
  904. break;
  905. case 8:
  906. Double valueSpatial2 = getValeurTagItemDoubleRatio()* setFacteurPuissance(10,1);
  907. setTagItemDoubleRatio(valueSpatial2);//prend la valeur
  908. setNounUnitRatio("mm*mm/pixel");
  909. break;
  910. case 7:
  911. setNounUnitRatio("mm*pixel/sec");
  912. break;
  913. case 6:
  914. this.setNounUnitRatio("dB*pixel/seconds");
  915. break;
  916. case 5:
  917. this.setNounUnitRatio("hertz/pixel");
  918. break;
  919. case 4:
  920. setNounUnitRatio("seconds/pixel");
  921. break;
  922. case 3:
  923. this.setNounUnitRatio("mm/pixel");
  924. break;
  925. case 2:
  926. this.setNounUnitRatio("dB/pixel");
  927. break;
  928. case 1:
  929. this.setNounUnitRatio("percent/pixel");
  930. break;
  931. case 0:
  932. this.setNounUnitRatio("None or not applicable");
  933. break;
  934. default:
  935. break;
  936. }
  937. switch (result) {
  938. case "A":
  939. Double valueSpatial3 = getValeurTagItemDoubleRatio()* setFacteurPuissance(10,2);
  940. setTagItemDoubleRatio(valueSpatial3);//prend la valeur
  941. this.setNounUnitRatio("mm*mm*mm/pixel");
  942. break;
  943. case "B":
  944. Double valueSpatial4 = getValeurTagItemDoubleRatio()* setFacteurPuissance(10,2);
  945. setTagItemDoubleRatio(valueSpatial4);//prend la valeur
  946. this.setNounUnit("mm*mm*mm*pixel/sec");
  947. break;
  948. case "C":
  949. this.setNounUnit("degrees");
  950. break;
  951. }
  952. }
  953. }
  954. /**
  955. * Prend la valeur d'un Ratio Spatial/Put value Ratio Spatial
  956. * @param valueSpatial
  957. * @return
  958. */
  959. public Double setTagItemDoubleRatio(double valueSpatial){
  960. return this.valueSpatial = valueSpatial;
  961. }
  962. /**
  963. * Donne la valeur du Ratio/Diving value ratio Spatial
  964. * @return
  965. */
  966. public Double getValeurTagItemDoubleRatio(){
  967. return valueSpatial;
  968. }
  969. /**
  970. * Donne les valeurs calculer des puissances/ Put and computing power
  971. * @param result3
  972. * @param facteur
  973. * @return
  974. * @return
  975. */
  976. public static double setFacteurPuissance(double result3, double facteur){
  977. return resultFacteurDix = Math.pow(result3, facteur);
  978. }
  979. /**
  980. * Obtient la valeur de puissance/ Giving value power
  981. * @return
  982. */
  983. public static double getFacteurPuissance(){
  984. return resultFacteurDix;
  985. }
  986. /**
  987. * Enregistre l'unite des items /Put unity unity items
  988. * @return this.nounUnit = nounUnit
  989. */
  990. public String setNounUnitRatio(String nounUnitRatio){
  991. return this.nounUnitRatio = nounUnitRatio;
  992. }
  993. /**
  994. * On obtient l'unite des items./Giving unity items
  995. * @return le nom de l'unité
  996. */
  997. public String getNounUnitRatio(){
  998. return nounUnitRatio;
  999. }
  1000. /**
  1001. * Prend la valeur interne d'un tag Item/ Put tag Item
  1002. * @param result
  1003. * @return
  1004. */
  1005. public String setTagItem(String result){
  1006. return this.result = result;
  1007. }
  1008. /**
  1009. * Donne la valeur du tag rechercher/Giving a value of tag seek
  1010. * @return le String de la valeur rechercher du tag dans un item
  1011. */
  1012. public String getValeurTagItem(){
  1013. return result;
  1014. }
  1015. /**
  1016. * Prend la valeur interne d'un tag Item/ Put the value tag iteù
  1017. * @return
  1018. */
  1019. public Double setTagItemDouble(double result2){
  1020. return this.result2 = result2;
  1021. }
  1022. /**
  1023. * Donne la valeur du tag rechercher/Giving the value Tag
  1024. * @return le Double de la valeur rechercher du tag dans un item
  1025. */
  1026. public Double getValeurTagItemDouble(){
  1027. return result2;
  1028. }
  1029. /**
  1030. * reads a String value from tag dicom (dcm4che2)
  1031. * @param tagNr the Tag to read
  1032. * @return the value as String
  1033. * Returns the Specific Character Set defined by Attribute Specific Character Set (0008,0005)
  1034. * of this or the root Data Set, if this is a Nested Data Set containing in a Sequence Eleme
  1035. */
  1036. public String getHeaderStringValue(int tagNr) {
  1037. try {
  1038. Attributes elem = getObject();
  1039. elem.setSpecificCharacterSet("GB18030");
  1040. String val = elem.getString(tagNr);
  1041. if (val == null) {
  1042. val = "";
  1043. }
  1044. return val;
  1045. } catch (Exception e) {
  1046. return "";
  1047. }
  1048. }
  1049. /**
  1050. * reads a String value from tag dicom (dcm4che2)
  1051. * @param tagNr the Tag to read
  1052. * @return the value as String
  1053. * Returns the Specific Character Set defined by Attribute Specific Character Set (0008,0005)
  1054. * of this or the root Data Set, if this is a Nested Data Set containing in a Sequence Eleme
  1055. */
  1056. public String[] getHeaderStringValues(int tagNr) {
  1057. try {
  1058. System.out.println(222);
  1059. Attributes elem = getObject();
  1060. elem.setSpecificCharacterSet("GB18030");
  1061. String[] val = elem.getStrings(tagNr);
  1062. return val;
  1063. } catch (Exception e) {
  1064. return null;
  1065. }
  1066. }
  1067. /**
  1068. * reads a String value from the Dicomheader
  1069. * @param tagNr the Tag to read
  1070. * @param dcmelement
  1071. * @return the value as String
  1072. */
  1073. public String getHeaderStringValue(Attributes dcmelement, int tagNr) {
  1074. try {
  1075. System.out.println(333);
  1076. /* dcmelement.setSpecificCharacterSet("ISO_IR 100"); */
  1077. dcmelement.setSpecificCharacterSet("GB18030");
  1078. String val = dcmelement.getString(tagNr);
  1079. if (val == null) {
  1080. val = "";
  1081. }
  1082. return val;
  1083. } catch (Exception e) {
  1084. return "";
  1085. }
  1086. }
  1087. /**
  1088. *reads the tag (group,element)
  1089. * @param headerNr e.g. "0018,0050" to get Slice Thickness<br>
  1090. * @return String
  1091. */
  1092. public String getHeaderStringValue(String headerNr) {
  1093. headerNr = headerNr.replaceAll("xx", "00").replaceAll("XX", "00");
  1094. return getHeaderStringValue(toTagInt(headerNr));
  1095. }
  1096. /**
  1097. * Giving time a tag ("xxxx,")
  1098. * @param tagNr
  1099. * @return
  1100. */
  1101. public Time getHeaderTimeValue(String tagNr) {
  1102. return getHeaderTimeValue(toTagInt(tagNr));
  1103. }
  1104. /**
  1105. * Giving time a tag
  1106. * @param tagNr
  1107. * @return time
  1108. */
  1109. public Time getHeaderTimeValue(int tagNr) {
  1110. String time = getHeaderStringValue(tagNr);
  1111. if (time.length() != 6){
  1112. return null;
  1113. }
  1114. try {
  1115. int hour = Integer.parseInt(time.substring(0,2));
  1116. int min = Integer.parseInt(time.substring(2,4));
  1117. int sec = Integer.parseInt(time.substring(4,6));
  1118. return new Time(hour,min,sec);
  1119. } catch (Exception e) {
  1120. }
  1121. return null;
  1122. }
  1123. /**
  1124. * retrieves a specific HeaderTag that is inside anotehr tag
  1125. * or "0008,0102, 0054,0220" to get the Coding Scheme Designator after View Code Sequence
  1126. * @return String
  1127. * * @param tagHierarchy; e.g. {Tag.UID, Tag.SOPInstanceUID, Tag.CodeMeaning}
  1128. * @return
  1129. */
  1130. public String getHeaderValueInsideTag(int[] tagHierarchy) {
  1131. try {
  1132. for (int i = 0; i < tagHierarchy.length-1; i++) {
  1133. return getObject().getString(tagHierarchy[i]);
  1134. }
  1135. } catch (Exception e) {
  1136. String tags = "";
  1137. for (int i = 0; i < tagHierarchy.length; i++) {
  1138. tags += toTagString(tagHierarchy[i]) + " ";
  1139. }
  1140. return "";
  1141. }
  1142. return null;
  1143. }
  1144. /**
  1145. * converts the int representation of a header number
  1146. * e.g. 0x00080010 to the corresponding String 0008,0010
  1147. * @return 0008,0010 as String
  1148. */
  1149. public static String toTagString(int tagNr) {
  1150. return shortToHex(tagNr >> 16) +
  1151. ',' + shortToHex(tagNr);
  1152. }
  1153. public static String shortToHex(int val) {
  1154. char[] ch = new char[4];
  1155. shortToHex(val, ch, 0);
  1156. return new String(ch);
  1157. }
  1158. public static StringBuffer shortToHex(int val, StringBuffer sb) {
  1159. sb.append(HEX_DIGITS[(val >> 12) & 0xf]);
  1160. sb.append(HEX_DIGITS[(val >> 8) & 0xf]);
  1161. sb.append(HEX_DIGITS[(val >> 4) & 0xf]);
  1162. sb.append(HEX_DIGITS[val & 0xf]);
  1163. return sb;
  1164. }
  1165. public static void shortToHex(int val, char[] ch, int off) {
  1166. ch[off] = HEX_DIGITS[(val >> 12) & 0xf];
  1167. ch[off+1] = HEX_DIGITS[(val >> 8) & 0xf];
  1168. ch[off+2] = HEX_DIGITS[(val >> 4) & 0xf];
  1169. ch[off+3] = HEX_DIGITS[val & 0xf];
  1170. }
  1171. /**
  1172. * Create file output dicom
  1173. * @param fileOutput : file output
  1174. * @throws IOException
  1175. *
  1176. *
  1177. * Example:
  1178. *
  1179. *
  1180. *
  1181. *
  1182. */
  1183. public void writeTo(File fileOutput, Attributes fmi, Attributes object) throws IOException {
  1184. DicomOutputStream dos = new DicomOutputStream( new File (fileOutput +".dcm"));
  1185. dos.setEncodingOptions(encOpts);
  1186. dos.writeDataset(fmi, object);
  1187. dos.finish();
  1188. dos.flush();
  1189. }
  1190. /**
  1191. * Writting
  1192. * @param fileOutput
  1193. * @param h
  1194. * @param w
  1195. * @throws IOException
  1196. */
  1197. public void writeToSegment(File fileOutput, int h, int w) throws IOException{
  1198. DicomOutputStream dos = new DicomOutputStream( new File (fileOutput +".dcm"));
  1199. dos.setEncodingOptions(encOpts);
  1200. }
  1201. /**
  1202. * Create overlay in pixelData
  1203. * @param object
  1204. */
  1205. public void overlayCreate(Attributes object){
  1206. int position = object.getInt( Tag.OverlayBitPosition, 0 );
  1207. if( position == 0 ) {
  1208. return;
  1209. }
  1210. int bit = 1 << position;
  1211. int[] pixels = object.getInts( Tag.PixelData );
  1212. int count = 0;
  1213. for( int pix : pixels )
  1214. {
  1215. int overlay = pix & bit;
  1216. pixels[ count++ ] = pix - overlay;
  1217. }
  1218. object.setInt( Tag.PixelData, VR.OW, pixels );
  1219. }
  1220. /**
  1221. * dicom.setString(Tag.PerformingPhysicianName, VR.PN, "Jean");
  1222. dicom.setString(Tag.AdmittingDiagnosesDescription, VR.LO, "CHU");
  1223. Sequence seq= dicom.newSequence(Tag.AnatomicRegionSequence,0);
  1224. Attributes dicom2 = new Attributes();
  1225. * @param dicom
  1226. */
  1227. public void setItem(Attributes dicom, int TagSequenceName){
  1228. Sequence seq= dicom.newSequence(TagSequenceName,0);
  1229. dicom.setString(Tag.CodingSchemeDesignator, VR.SH, "SRT");
  1230. dicom.setString(Tag.CodeValue, VR.SH, "T-AA000");
  1231. dicom.setString(Tag.CodeMeaning, VR.LO, "Eye");
  1232. seq.add(dicom);
  1233. }
  1234. public static void main(String[] args) throws Exception {
  1235. File file = new File("C:\\Users\\fendo\\Documents\\WeChat Files\\fen_do\\Files\\1234.dcm");
  1236. DisplayTag d = new DisplayTag(file);
  1237. @SuppressWarnings("static-access")
  1238. Attributes attrs = d.loadDicomObject(file);
  1239. //输出所有属性信息
  1240. System.out.println("所有信息: " + attrs);
  1241. //获取行
  1242. int row = attrs.getInt(Tag.Rows, 1);
  1243. //获取列
  1244. int columns = attrs.getInt(Tag.Columns, 1);
  1245. //窗宽窗位
  1246. float win_center = attrs.getFloat(Tag.WindowCenter, 1);
  1247. float win_width = attrs.getFloat(Tag.WindowWidth, 1);
  1248. System.out.println("" + "row=" + row + ",columns=" + row + ",row*columns = " + row * columns);
  1249. String patientName = attrs.getString(Tag.PatientName, "");
  1250. System.out.println("姓名:" + patientName);
  1251. //生日
  1252. String patientBirthDate = attrs.getString(Tag.PatientBirthDate, "");
  1253. System.out.println("生日:" + patientBirthDate);
  1254. //机构
  1255. String institution = attrs.getString(Tag.InstitutionName, "");
  1256. System.out.println("机构:" + institution);
  1257. //站点
  1258. String station = attrs.getString(Tag.StationName, "");
  1259. System.out.println("站点:" + station);
  1260. //制造商
  1261. String Manufacturer = attrs.getString(Tag.Manufacturer, "");
  1262. System.out.println("制造商:" + Manufacturer);
  1263. //制造商模型
  1264. String ManufacturerModelName = attrs.getString(Tag.ManufacturerModelName, "");
  1265. System.out.println("制造商模型:" + ManufacturerModelName);
  1266. //描述--心房
  1267. String description = attrs.getString(Tag.StudyDescription, "");
  1268. System.out.println("描述--心房:" + description);
  1269. //描述--具体
  1270. String SeriesDescription = attrs.getString(Tag.SeriesDescription, "");
  1271. System.out.println("描述--具体:" + SeriesDescription);
  1272. //描述时间
  1273. String studyData = attrs.getString(Tag.StudyDate, "");
  1274. System.out.println("描述时间:" + studyData);
  1275. byte[] bytename = attrs.getBytes(Tag.PatientName);
  1276. System.out.println("姓名: " + new String(bytename,"gb18030"));
  1277. byte[] bytesex = attrs.getBytes(Tag.PatientSex);
  1278. System.out.println("性别: " + new String(bytesex,"gb18030"));
  1279. }
  1280. }
复制代码

输出如下:

所有信息: (0008,0005) CS [ISO_IR 100] SpecificCharacterSet
(0008,0008) CS [ORIGINAL\PRIMARY] ImageType
(0008,0016) UI [1.2.840.10008.5.1.4.1.1.1.1] SOPClassUID
(0008,0018) UI [1.2.840.113619.2.203.4.2147483647.1486521160.448521] SOPInstan
(0008,0020) DA [20170208] StudyDate
(0008,0021) DA [20170208] SeriesDate
(0008,0022) DA [20170208] AcquisitionDate
(0008,0023) DA [20170208] ContentDate
(0008,002A) DT [20170208103237.000000] AcquisitionDateTime
(0008,0030) TM [103154.000] StudyTime
(0008,0031) TM [103158.000] SeriesTime
(0008,0032) TM [103237.000] AcquisitionTime
(0008,0033) TM [103240.000] ContentTime
(0008,0050) SH [T77792] AccessionNumber
(0008,0060) CS [DX] Modality
(0008,0068) CS [FOR PRESENTATION] PresentationIntentType
(0008,0070) LO ["GE Healthcare"] Manufacturer
(0008,0080) LO [HeFei RICH] InstitutionName
(0008,0081) ST [Not Initialized
Not Initialized
HeFei
AnHui
Not Initialize(0008,0090) PN [] ReferringPhysicianName
(0008,1010) SH [082407110134] StationName
(0008,1030) LO [ACHEST] StudyDescription
(0008,103E) LO [Chest] SeriesDescription
(0008,1040) LO [Not Initialized] InstitutionalDepartmentName
(0008,1050) PN [] PerformingPhysicianName
(0008,1090) LO ["Definium 6000"] ManufacturerModelName
(0008,1110) SQ [] ReferencedStudySequence
(0008,1120) SQ [] ReferencedPatientSequence
(0008,2112) SQ [1 Items] SourceImageSequence
>Item #1
>(0008,1150) UI [1.2.840.10008.5.1.4.1.1.1.1.1] ReferencedSOPClassUID
>(0008,1155) UI [1.2.840.113619.2.203.4.2147483647.1486521157.927189] Referenc
(0008,2218) SQ [1 Items] AnatomicRegionSequence
>Item #1
>(0008,0100) SH [T-D3000] CodeValue
>(0008,0102) SH [SNM3] CodingSchemeDesignator
>(0008,0104) LO [Chest] CodeMeaning
(0010,0010) PN [zhang^xiao di] PatientName
(0010,0020) LO [T77792] PatientID
(0010,0030) DA [19860618] PatientBirthDate
(0010,0032) TM [] PatientBirthTime
(0010,0040) CS [F] PatientSex
(0010,1010) AS [030Y] PatientAge
(0010,1030) DS [] PatientWeight
(0011,0010) LO [GEMS_GDXE_FALCON_04]
(0011,1003) UI [1.2.840.113619.2.203.4.2147483647.1486521118.562807]
(0011,1004) CS [SE]
(0011,1005) UI [1.2.840.113619.2.203.4.2147483647.1486521152.970120]
(0011,1006) DS [0.083936]
(0011,1009) SL [0]
...
row=2021,columns=2021,row*columns = 4084441
姓名:zhang^xiao di
生日:19860618
机构:HeFei RICH
站点:082407110134
制造商:"GE Healthcare"
制造商模型:"Definium 6000"
描述--心房:ACHEST
描述--具体:Chest
描述时间:20170208
姓名: zhang^xiao di
性别: F

更多关于java算法相关内容感兴趣的读者可查看本站专题:《Java文件与目录操作技巧汇总》、《Java数据结构与算法教程》、《Java操作DOM节点技巧总结》和《Java缓存操作技巧汇总》

希望本文所述对大家java程序设计有所帮助。



回复

使用道具 举报