MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / addInfo

Method addInfo

ij/src/main/java/ij/plugin/DICOM.java:776–798  ·  view source on GitHub ↗
(int tag, String value)

Source from the content-addressed store, hash-verified

774 }
775
776 void addInfo(int tag, String value) throws IOException {
777 String info = getHeaderInfo(tag, value);
778 if (inSequence && info!=null && vr!=SQ) info = ">" + info;
779 if (info!=null && tag!=ITEM) {
780 int group = tag>>>16;
781 //if (group!=previousGroup && (previousInfo!=null&&previousInfo.indexOf("Sequence:")==-1))
782 // dicomInfo.append("\n");
783 previousGroup = group;
784 previousInfo = info;
785 dicomInfo.append(tag2hex(tag)+info+"\n");
786 }
787 if (IJ.debugMode) {
788 if (info==null) info = "";
789 vrLetters[0] = (byte)(vr >> 8);
790 vrLetters[1] = (byte)(vr & 0xFF);
791 String VR = new String(vrLetters);
792 IJ.log("(" + tag2hex(tag) + VR
793 + " " + elementLength
794 + " bytes from "
795 + (location-elementLength)+") "
796 + info);
797 }
798 }
799
800 void addInfo(int tag, int value) throws IOException {
801 addInfo(tag, Integer.toString(value));

Callers 1

getFileInfoMethod · 0.95

Calls 5

getHeaderInfoMethod · 0.95
tag2hexMethod · 0.95
logMethod · 0.95
appendMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected