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

Method DicomDecoder

ij/src/main/java/ij/plugin/DICOM.java:304–326  ·  view source on GitHub ↗
(String directory, String fileName)

Source from the content-addressed store, hash-verified

302 private boolean acquisitionSequence;
303
304 public DicomDecoder(String directory, String fileName) {
305 this.directory = directory;
306 this.fileName = fileName;
307 String path = null;
308 if (dictionary==null && IJ.getApplet()==null) {
309 path = Prefs.getImageJDir()+"DICOM_Dictionary.txt";
310 File f = new File(path);
311 if (f.exists()) try {
312 dictionary = new Properties();
313 InputStream is = new BufferedInputStream(new FileInputStream(f));
314 dictionary.load(is);
315 is.close();
316 if (IJ.debugMode) IJ.log("DicomDecoder: using "+dictionary.size()+" tag dictionary at "+path);
317 } catch (Exception e) {
318 dictionary = null;
319 }
320 }
321 if (dictionary==null) {
322 DicomDictionary d = new DicomDictionary();
323 dictionary = d.getDictionary();
324 if (IJ.debugMode) IJ.log("DicomDecoder: "+path+" not found; using "+dictionary.size()+" tag built in dictionary");
325 }
326 }
327
328 String getString(int length) throws IOException {
329 byte[] buf = new byte[length];

Callers

nothing calls this directly

Calls 8

getAppletMethod · 0.95
getImageJDirMethod · 0.95
logMethod · 0.95
getDictionaryMethod · 0.95
loadMethod · 0.65
closeMethod · 0.65
existsMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected