DCMTK简介五-dcmimage程序库
本帖最后由 medimage 于 2015-12-4 21:26 编辑五、dcmimage程序库dcmimage模块为dcmimgle模块提供对彩色图像的支持。对单色图像的支持由dcmimgle提供,对JPEG压缩图像的支持由dcmjpeg模块支持。
主要接口类:--DicomImage: 在dcmimgle中已介绍。工具:--dcm2pnm: Convert DICOM images to PPM/PGM, PNG, TIFF or BMP--dcmquant: Convert DICOM color images to palette color--dcmscale: Scale DICOM images举例:--载入一幅DICOM单帧图像(单色或彩色),并显示其像素数据。#include "diregist.h" /* required to support color images *//* ... */DicomImage *image = new DicomImage("test.dcm");if (image != NULL){if (image->getStatus() == EIS_Normal){ Uint8 *pixelData = (Uint8 *)(image->getOutputData(8 /* bits per sample */)); if (pixelData != NULL) { /* do something useful with the pixel data */ }} else cerr << "Error: cannot load DICOM image (" << DicomImage::getString(image->getStatus()) << ")" << endl;}delete image;
先学习一下,以留备用 谢谢楼主! 大哥谢了 先看看先。。。 先学习一下,以留备用 看看高人有多高
页:
[1]