417. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/5/2017 12:06:51 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.

417.1 Files compared

# Location File Last Modified
1 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\VixGuiImageDisplayApplet\main\src\java\gov\va\med\imaging\dicom\io Part10DataSetReader.java Mon Dec 4 21:35:04 2017 UTC
2 IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\VixGuiImageDisplayApplet\main\src\java\gov\va\med\imaging\dicom\io Part10DataSetReader.java Mon Dec 4 22:07:23 2017 UTC

417.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 188
Changed 1 2
Inserted 0 0
Removed 0 0

417.3 Comparison options

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

417.4 Active regular expressions

No regular expressions were active.

417.5 Comparison detail

  1   package go v.va.med.i maging.dic om.io;
  2  
  3   import gov .va.med.im aging.dico m.DataElem ent;
  4   import gov .va.med.im aging.dico m.DataElem entFactory ;
  5   import gov .va.med.im aging.dico m.DataElem entTag;
  6   import gov .va.med.im aging.dico m.DataSet;
  7   import gov .va.med.im aging.dico m.exceptio ns.DicomFo rmatExcept ion;
  8   import gov .va.med.im aging.dico m.exceptio ns.Invalid VRExceptio n;
  9   import gov .va.med.im aging.dico m.exceptio ns.Invalid VRModeExce ption;
  10  
  11   import jav a.io.IOExc eption;
  12   import org .apache.lo gging.log4 j.LogManag er;
  13   import org .apache.lo gging.log4 j.Logger;
  14  
  15   /**
  16    * 
  17    * @author         
BECKEC
  18    *
  19    */
  20   public cla ss Part10D ataSetRead er
  21   {
  22           //  The list  of element  tags that  may occur  in a Part  10 header
  23           //  The occur rence of a ny other e lement tag  will end  the readin g of the
  24           //  Part 10 h eader
  25           pu blic final  static Da taElementT ag[] part1 0ElementTa gs = new D ataElement Tag[]
  26       {
  27                    new  DataElemen tTag(0x000 2, 0x0000) ,              // Gro up Length
  28                    new  DataElemen tTag(0x000 2, 0x0001) ,              // Fil e Meta Inf ormation V ersion
  29                    new  DataElemen tTag(0x000 2, 0x0002) ,              // Med ia Storage  SOP Class  UID
  30                    new  DataElemen tTag(0x000 2, 0x0003) ,              // Med ia Storage  SOP Insta nce UID
  31                    new  DataElemen tTag(0x000 2, 0x0010) ,              // Tra nsfer Synt ax UID
  32                    new  DataElemen tTag(0x000 2, 0x0012) ,              // Imp lementatio n Class UI D
  33                    new  DataElemen tTag(0x000 2, 0x0013) ,              // Imp lementatio n Class UI D
  34                    new  DataElemen tTag(0x000 2, 0x0016) ,              // Sou rce Applic ation Enti ty Title
  35                    new  DataElemen tTag(0x000 2, 0x0100) ,              // Pri vate Infor mation Cre ator UID
  36                    new  DataElemen tTag(0x000 2, 0x0102)                // Pri vate Infor mation
  37       };
  38           
  39           pr ivate stat ic boolean  isPart10H eaderEleme ntTag(Data ElementTag  elementTa g)
  40           {
  41                    for( DataElemen tTag heade rTag : par t10Element Tags)
  42                             if(hea derTag.equ als(elemen tTag))
  43                                      return t rue;
  44                    retu rn false;
  45           }
  46           
  47           pr ivate fina l DataElem entReader  reader;
  48           pr ivate Logg er logger  = LogManag er.getLogg er(this.ge tClass().g etName());
  49           
  50           /* *
  51            *  
  52            *  @param in putStream
  53            *  @param da taElementF actory
  54            * /
  55           pu blic Part1 0DataSetRe ader(DataE lementLimi tedInputSt ream input Stream)
  56           {
  57                    logg er.trace(" Part10Data SetReader  instantiat ing... ");
  58                    Data ElementFac tory heade rElementFa ctory = Da taElementF actory.get DefaultHea derElement Factory();
  59                    this .reader =  new DataEl ementReade r(inputStr eam, heade rElementFa ctory);
  60                    logg er.trace(" Part10Data SetReader  instantiat ed. ");
  61           }
  62  
  63           /* *
  64            *  Read a Da taSet, sta rting from  the curre nt positio n and stop ping when  an
  65            *  element t ag not in  the Part10  list is e ncountered .  The str eam is lef t at the
  66            *  start of  the first  non-Part10  element.
  67            *  @return
  68            *  @throws I OException  
  69            *  @throws U nsupported OperationE xception 
  70            *  @throws I nvalidVREx ception 
  71            *  @throws I nvalidVRMo deExceptio
  72            *  @throws D icomFormat Exception 
  73            * /
  74           pu blic DataS et readPar t10DataSet () 
  75           th rows 
  76                    Unsu pportedOpe rationExce ption, IOE xception, 
  77                    Inva lidVRModeE xception,  InvalidVRE xception,  DicomForma tException
  78           {
  79                    logg er.traceEn try("readP art10DataS et");
  80                    Data Set dataSe t = new Da taSet(read er.getData ElementFac tory().get TransferSy ntaxUid()) ;
  81                    
  82                    for(  DataEleme ntTag data ElementTag  = reader. getInputSt ream().pee kNextDataE lementTag( );
  83                             dataEl ementTag ! = null &&  isPart10He aderElemen tTag(dataE lementTag) ;
  84                             dataEl ementTag =  reader.ge tInputStre am().peekN extDataEle mentTag()  )
  85                    {
  86                             DataEl ement data Element =  reader.rea dNextDataE lement();
  87                             dataSe t.add(data Element);
  88                             logger .info("Add ed data el ement " +  dataElemen t.getDataE lementTag( ).toString () + ", "  +
  89                                               dataElemen t.getValue Representa tion()[0]. name() + "  to data s et.");
  90                    }
  91                    
  92                    logg er.traceEx it("readPa rt10DataSe t");
  93                    retu rn dataSet ;
  94           }
  95   }