Produced by Araxis Merge on 7/10/2017 1:01:42 PM Central Daylight 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 | C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\mix\business | InstanceComparator.java | Thu Jun 29 17:22:22 2017 UTC |
| 2 | C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\CoreValueObjects\main\src\java\gov\va\med\imaging\mix\business | InstanceComparator.java | Thu Jul 6 15:00:09 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 228 |
| 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.mix .business; | |
| 2 | ||
| 3 | import gov .va.med.im aging.exch ange.enums .ObjectOri gin; | |
| 4 | import gov .va.med.im aging.mix. business.f hir.Instan ce; | |
| 5 | ||
| 6 | import jav a.io.Seria lizable; | |
| 7 | import jav a.util.Com parator; | |
| 8 | ||
| 9 | /** | |
| 10 | * A Compa rator clas s to assur e that the images in a series remain in order of i en | |
| 11 | * | |
| 12 | * @author DNS TITTOC | |
| 13 | * | |
| 14 | */ | |
| 15 | public cla ss Instanc eComparato r implemen ts Compara tor<Instan ce>, Seria lizable { | |
| 16 | ||
| 17 | /* * | |
| 18 | * | |
| 19 | * / | |
| 20 | pr ivate stat ic final l ong serial VersionUID = -474216 0600868516 301L; | |
| 21 | ||
| 22 | /* * | |
| 23 | * | |
| 24 | * / | |
| 25 | @O verride | |
| 26 | pu blic int c ompare(Ins tance inst ance1, Ins tance inst ance2) | |
| 27 | { | |
| 28 | if(i nstance1 = = null && instance2 != null) | |
| 29 | return 1; | |
| 30 | else if(instan ce1 != nul l && insta nce2 == nu ll) | |
| 31 | return -1; | |
| 32 | else if(instan ce1 == nul l && insta nce2 == nu ll) | |
| 33 | return 0; | |
| 34 | ||
| 35 | /* | |
| 36 | int dicomImage NumberRela tion = ima ge2.getIma geNumber() .compareTo (image1.ge tImageNumb er()); | |
| 37 | int dicomImage UidRelatio n = image2 .getImageU id().compa reTo(image 1.getImage Uid()); | |
| 38 | int imageIenRe lation = i mage2.getI en().compa reTo(image 1.getIen() ); | |
| 39 | */ | |
| 40 | // n ot sure if it should be image1 - image2, or image2 - image1, | |
| 41 | // w ith image2 - image1, DOD image s came in wrong orde r. Will th is change have an ef fect on VA images? | |
| 42 | ||
| 43 | ||
| 44 | if(( instance1. getObjectO rigin() == ObjectOri gin.DOD) | | | |
| 45 | (insta nce2.getOb jectOrigin () == Obje ctOrigin.D OD)) | |
| 46 | { | |
| 47 | int di comImageNu mberRelati on = 0; | |
| 48 | ||
| 49 | try | |
| 50 | { | |
| 51 | Integer instance1I mageNumber = Integer .parseInt( instance1. getNumber( )); | |
| 52 | Integer instance2I mageNumber = Integer .parseInt( instance2. getNumber( )); | |
| 53 | dicomIma geNumberRe lation = i nstance1Im ageNumber. compareTo( instance2I mageNumber ); | |
| 54 | } | |
| 55 | catch( Throwable t) {} | |
| 56 | ||
| 57 | int di comImageUi dRelation = | |
| 58 | instance 1.getUid() == null ? | |
| 59 | (instance2 .getUid() == null ? 0 : 1) : | |
| 60 | instance1. getUid().c ompareTo(i nstance2.g etUid()); | |
| 61 | ||
| 62 | int in stanceIenR elation = | |
| 63 | instance 1.getIen() == null ? | |
| 64 | (instance2 .getIen() == null ? 0 : 1) : | |
| 65 | instance1. getIen().c ompareTo(i nstance2.g etIen()); | |
| 66 | ||
| 67 | // if the instan ce is from the DOD t hen the ie n field (I d) does no t necessar ily contai n useful s orting inf ormation ( since it i s Base64+ encoded) | |
| 68 | // if the dicom image id a nd dicom U ID are not 0, then u se only th ese two fi elds to so rt by. | |
| 69 | return dicomImag eNumberRel ation != 0 ? dicomIm ageNumberR elation : | |
| 70 | dicomIma geUidRelat ion != 0 ? dicomImag eUidRelati on : | |
| 71 | instanceIe nRelation; | |
| 72 | ||
| 73 | } | |
| 74 | else | |
| 75 | { | |
| 76 | // JMW 3/12/08 - reversing the order of the so rts (was c ausing the images to be in des cending or der instea d of ascen ding) | |
| 77 | ||
| 78 | int di comImageNu mberRelati on = 0; | |
| 79 | ||
| 80 | try | |
| 81 | { | |
| 82 | Integer instance1I mageNumber = Integer .parseInt( instance1. getNumber( )); | |
| 83 | Integer instance2I mageNumber = Integer .parseInt( instance2. getNumber( )); | |
| 84 | dicomIma geNumberRe lation = i nstance1Im ageNumber. compareTo( instance2I mageNumber ); | |
| 85 | } | |
| 86 | catch( Throwable t) | |
| 87 | { | |
| 88 | if(insta nce1.getNu mber() != null) | |
| 89 | { | |
| 90 | dicomImage NumberRela tion = ins tance1.get Number().c ompareTo(i nstance2.g etNumber() ); | |
| 91 | } | |
| 92 | } | |
| 93 | ||
| 94 | //int dicomImage NumberRela tion = ins tance1.get Number().c ompareTo(i nstance2.g etNumber() ); | |
| 95 | // all ow null Im ageUID for non-dicom images | |
| 96 | int di comImageUi dRelation = instance 1.getUid() != null & & instance 2.getUid() != null ? | |
| 97 | instance 1.getUid() .compareTo (instance2 .getUid()) : | |
| 98 | 0; | |
| 99 | // JMW 3/12/08 - base32 de coding the IEN so it can be so rted prope rly | |
| 100 | // CTB 29Nov2009 | |
| 101 | //int instanceIe nRelation = Base32Co nversionUt ility.base 32Decode(i nstance1.g etIen()).c ompareTo(B ase32Conve rsionUtili ty.base32D ecode(inst ance2.getI en())); | |
| 102 | int in stanceIenR elation = instance1. getIen().c ompareTo(i nstance2.g etIen()); | |
| 103 | /* | |
| 104 | return imageIen Relation ! = 0 ? imag eIenRelati on : | |
| 105 | dicomIma geUidRelat ion != 0 ? dicomImag eUidRelati on : | |
| 106 | dicomImage NumberRela tion; | |
| 107 | */ | |
| 108 | // JMW 9/26/08 - images IE Ns do NOT always ind icate prop er order f or the ima ges | |
| 109 | return dicomIma geNumberRe lation != 0 ? dicomI mageNumber Relation : | |
| 110 | instance IenRelatio n != 0 ? i nstanceIen Relation : | |
| 111 | dicomImage UidRelatio n; | |
| 112 | } | |
| 113 | } | |
| 114 | ||
| 115 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.