Produced by Araxis Merge on 12/5/2017 12:06:39 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DicomServiceProvider\main\src\java\gov\va\med\imaging\dicom\parser\io | Part10DataSetReader.java | Mon Dec 4 21:35:22 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DicomServiceProvider\main\src\java\gov\va\med\imaging\dicom\parser\io | Part10DataSetReader.java | Mon Dec 4 21:59:36 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 198 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | package go v.va.med.i maging.dic om.parser. io; | |
| 2 | ||
| 3 | import gov .va.med.im aging.dico m.dataset. DataSet; | |
| 4 | import gov .va.med.im aging.dico m.dataset. elements.D ataElement ; | |
| 5 | import gov .va.med.im aging.dico m.dataset. elements.D ataElement Tag; | |
| 6 | import gov .va.med.im aging.dico m.exceptio ns.DicomFo rmatExcept ion; | |
| 7 | import gov .va.med.im aging.dico m.exceptio ns.Invalid VRExceptio n; | |
| 8 | import gov .va.med.im aging.dico m.exceptio ns.Invalid VRModeExce ption; | |
| 9 | import gov .va.med.im aging.dico m.parser.i mpl.DataEl ementFacto ry; | |
| 10 | import gov .va.med.im aging.dico m.parser.i mpl.DataEl ementFacto ryImpl; | |
| 11 | ||
| 12 | import jav a.io.IOExc eption; | |
| 13 | import org .apache.lo gging.log4 j.LogManag er; | |
| 14 | import org .apache.lo gging.log4 j.Logger; | |
| 15 | ||
| 16 | /** | |
| 17 | * | |
| 18 | * @author
|
|
| 19 | * | |
| 20 | */ | |
| 21 | public cla ss Part10D ataSetRead er | |
| 22 | { | |
| 23 | // The list of element tags that may occur in a Part 10 header | |
| 24 | // The occur rence of a ny other e lement tag will end the readin g of the | |
| 25 | // Part 10 h eader | |
| 26 | pu blic final static Da taElementT ag[] permi ssiblePart 10HeaderEl ementTags = new Data ElementTag [] | |
| 27 | { | |
| 28 | new DataElemen tTag(0x000 2, 0x0000) , // Gro up Length | |
| 29 | new DataElemen tTag(0x000 2, 0x0001) , // Fil e Meta Inf ormation V ersion | |
| 30 | new DataElemen tTag(0x000 2, 0x0002) , // Med ia Storage SOP Class UID | |
| 31 | new DataElemen tTag(0x000 2, 0x0003) , // Med ia Storage SOP Insta nce UID | |
| 32 | new DataElemen tTag(0x000 2, 0x0010) , // Tra nsfer Synt ax UID | |
| 33 | new DataElemen tTag(0x000 2, 0x0012) , // Imp lementatio n Class UI D | |
| 34 | new DataElemen tTag(0x000 2, 0x0013) , // Imp lementatio n Class UI D | |
| 35 | new DataElemen tTag(0x000 2, 0x0016) , // Sou rce Applic ation Enti ty Title | |
| 36 | new DataElemen tTag(0x000 2, 0x0100) , // Pri vate Infor mation Cre ator UID | |
| 37 | new DataElemen tTag(0x000 2, 0x0102) // Pri vate Infor mation | |
| 38 | }; | |
| 39 | ||
| 40 | pr ivate stat ic boolean isPart10H eaderEleme ntTag(Data ElementTag elementTa g) | |
| 41 | { | |
| 42 | for( DataElemen tTag heade rTag : per missiblePa rt10Header ElementTag s) | |
| 43 | if(hea derTag.equ als(elemen tTag)) | |
| 44 | return t rue; | |
| 45 | retu rn false; | |
| 46 | } | |
| 47 | ||
| 48 | pr ivate fina l DataElem entReader reader; | |
| 49 | pr ivate Logg er logger = LogManag er.getLogg er(this.ge tClass().g etName()); | |
| 50 | ||
| 51 | /* * | |
| 52 | * | |
| 53 | * @param in putStream | |
| 54 | * @param da taElementF actory | |
| 55 | * / | |
| 56 | pu blic Part1 0DataSetRe ader(DataE lementLimi tedInputSt ream input Stream) | |
| 57 | { | |
| 58 | logg er.trace(" Part10Data SetReader instantiat ing... "); | |
| 59 | Data ElementFac tory heade rElementFa ctory = Da taElementF actoryImpl .getDefaul tHeaderEle mentFactor y(); | |
| 60 | this .reader = new DataEl ementReade r(inputStr eam, heade rElementFa ctory); | |
| 61 | logg er.trace(" Part10Data SetReader instantiat ed. "); | |
| 62 | } | |
| 63 | ||
| 64 | /* * | |
| 65 | * Read a Da taSet, sta rting from the curre nt positio n and stop ping when an | |
| 66 | * element t ag not in the Part10 list is e ncountered . The str eam is lef t at the | |
| 67 | * start of the first non-Part10 element. | |
| 68 | * @return | |
| 69 | * @throws I OException | |
| 70 | * @throws U nsupported OperationE xception | |
| 71 | * @throws I nvalidVREx ception | |
| 72 | * @throws I nvalidVRMo deExceptio n | |
| 73 | * @throws D icomFormat Exception | |
| 74 | * / | |
| 75 | pu blic DataS et readPar t10DataSet () | |
| 76 | th rows | |
| 77 | Unsu pportedOpe rationExce ption, IOE xception, | |
| 78 | Inva lidVRModeE xception, InvalidVRE xception, DicomForma tException | |
| 79 | { | |
| 80 | logg er.traceEn try("readP art10DataS et"); | |
| 81 | Data Set dataSe t = new Da taSet(read er.getData ElementFac tory().get TransferSy ntaxUid()) ; | |
| 82 | ||
| 83 | for( DataEleme ntTag data ElementTag = reader. getInputSt ream().pee kNextDataE lementTag( ); | |
| 84 | dataEl ementTag ! = null && isPart10He aderElemen tTag(dataE lementTag) ; | |
| 85 | dataEl ementTag = reader.ge tInputStre am().peekN extDataEle mentTag() ) | |
| 86 | { | |
| 87 | DataEl ement<?> d ataElement = reader. readNextDa taElement( ); | |
| 88 | //RawVal ueParser<? ,?> rvp = rawValuePa rserFactor y.createRa wValuePars er(dataEle ment); | |
| 89 | //rvp.pa rseRawValu e(); | |
| 90 | ||
| 91 | dataSe t.add(data Element); | |
| 92 | ||
| 93 | logger .info("Add ed data el ement " + dataElemen t.getDataE lementTag( ).toString () + ", " + | |
| 94 | dataElemen t.getValue Representa tion()[0]. name() + " to data s et."); | |
| 95 | } | |
| 96 | ||
| 97 | logg er.traceEx it("readPa rt10DataSe t"); | |
| 98 | retu rn dataSet ; | |
| 99 | } | |
| 100 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.