ImageJ程序在JavaWeb的应用

本文介绍如何使用ImageJ进行图像处理,包括通过Maven引入ImageJ库、打开图像文件、获取图像尺寸及位深度等基本操作,并演示了将DICOM格式文件转换为PNG格式的方法。

1.maven引入

<dependency>
            <groupId>ij</groupId>
            <artifactId>ij</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/ij.jar</systemPath>
        </dependency>

在这里插入图片描述

2.下载ImageJ包,分享地址

「ij.jar」,点击链接保存,或者复制本段内容,打开「阿里云盘」APP ,无需下载,极速在线查看享用。
链接:https://www.aliyundrive.com/s/gaRp973sfpN

3.应用

//filePath文件路径
 ImagePlus imagePlus = openImage(filePath);
 ImageProcessor ip = imagePlus.getChannelProcessor();
 int height = ip.getHeight();
 int width = ip.getWidth();
 //通道
 int nChannels = ip.getNChannels();
 //位深度
 int bitDepth = ip.getBitDepth();
 //获取像素
 Object pixels = ip.getPixels();
<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值