我知道 ImageJ 有一个插件可以处理 NIfTI-1 文件(http://rsb.info.nih.gov/ij/plugins/nifti.html)。
但是该页面上的所有说明都是将 ImageJ 用作独立程序,但是我正在使用它的 API。如果没有源代码,我如何知道这个 jar 文件中有哪些可用的方法?
我也找不到源代码。
对于 imageJ 中支持的存档(例如 DICOM)来说非常简单:
public class ImageJTest {
public static void main(){
String path = "res/vaca.dcm";
FileInputStream fis;
ImageView image;
try {
fis = new FileInputStream(path);
DICOM d = new DICOM(fis);
d.run(path);
// Stretches the histogram because the pictures were being
// displayed too dark.
(new ij.plugin.ContrastEnhancer()).stretchHistogram(d, 0.1);
Image picture = SwingFXUtils.toFXImage(d.getBufferedImage(),
null);
// Makes the size standard for thumbnails
image = new ImageView(picture);
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}
如何在 imageJ 中加载 NIfTI-1 文件?