04-17-2006 05:38 AM
04-17-2006 06:44 AM
04-18-2006 11:45 AM
04-20-2006 02:35 AM
if (MimetypeMap.MIMETYPE_IMAGE_DICOM.equals(mimetype)) {
// make content available
if (reader != null) {
Image test = null;
File f = new File("file://C:\\CT-MONO2-16-brain.dcm");
//File f = new File("http://10.128.239.194:7001/alfresco/download/direct/workspace/SpacesStore/78d3ad12-cf81-11da-b921-e3...");
//File dest = TempFileProvider.createTempFile("out", ".jpg");
File dest = new File("file://C:\\out.jpg");
try {
ImageInputStream iis = ImageIO.createImageInputStream(f);
Iterator iter = ImageIO.getImageReadersByFormatName("DICOM");
ImageReader imgReader = (ImageReader) iter.next();
imgReader.setInput(iis, false);
test = imgReader.read(0);
OutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
JPEGImageEncoder enc = JPEGCodec.createJPEGEncoder(out);
enc.encode((BufferedImage)test);
String content = "<img src='" + dest.getAbsolutePath() + "'/>";
setInlineContent(content);
} catch (Exception e) {
e.printStackTrace();
}
04-20-2006 04:35 AM
04-20-2006 06:32 AM
04-26-2006 03:52 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.