FileInputStream fis; try { fis = new FileInputStream(path); DICOM d = new DICOM(fis); d.run(path); Image picture = SwingFXUtils.toFXImage(d.getBufferedImage(), null); Button bt = new Button(); bt.setGraphic(new ImageView(picture)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }
/** Returns the name of the specified DICOM tag id. */ public static String getTagName(String id) { return DICOM.getTagName(id); }
setStack(fileName, imp.getStack()); else setProcessor(fileName, imp.getProcessor()); setCalibration(imp.getCalibration()); setProperty("Info", dd.getDicomInfo()); setFileInfo(fi); // needed for revert if (arg.equals("")) show(); } else if (showErrors) IJ.error("DICOM Reader","Unable to decode DICOM header.");
private static String getSliceLabel(ImageStack stack, int n) { String info = stack.getSliceLabel(n); if ((info==null || info.length()<100) && stack.isVirtual()) { String dir = ((VirtualStack)stack).getDirectory(); String name = ((VirtualStack)stack).getFileName(n); DICOM reader = new DICOM(); info = reader.getInfo(dir+name); if (info!=null) info = name + "\n" + info; } return info; }
/** Returns the DICOM tags of the specified file as a string. */ public String getInfo(String path) { showErrors = false; gettingInfo = true; run(path); return info; }
setStack(fileName, imp.getStack()); else setProcessor(fileName, imp.getProcessor()); setCalibration(imp.getCalibration()); setProperty("Info", dd.getDicomInfo()); setFileInfo(fi); // needed for revert if (arg.equals("")) show(); } else if (showErrors) IJ.error("DICOM Reader","Unable to decode DICOM header.");
private static String getSliceLabel(ImageStack stack, int n) { String info = stack.getSliceLabel(n); if ((info==null || info.length()<100) && stack.isVirtual()) { String dir = ((VirtualStack)stack).getDirectory(); String name = ((VirtualStack)stack).getFileName(n); DICOM reader = new DICOM(); info = reader.getInfo(dir+name); if (info!=null) info = name + "\n" + info; } return info; }
/** Returns the DICOM tags of the specified file as a string. */ public String getInfo(String path) { showErrors = false; gettingInfo = true; run(path); return info; }
/** Opens the specified file as a DICOM. Does not display a message if there is an error. Here is an example: <pre> DICOM dcm = new DICOM(); dcm.open(path); if (dcm.getWidth()==0) IJ.log("Error opening '"+path+"'"); else dcm.show(); </pre> */ public void open(String path) { showErrors = false; run(path); }
/** Returns the name of the specified DICOM tag id. */ public static String getTagName(String id) { return DICOM.getTagName(id); }
/** Opens the specified file as a DICOM. Does not display a message if there is an error. Here is an example: <pre> DICOM dcm = new DICOM(); dcm.open(path); if (dcm.getWidth()==0) IJ.log("Error opening '"+path+"'"); else dcm.show(); </pre> */ public void open(String path) { showErrors = false; run(path); }