dcmpstat: プレゼンテーションステートライブラリとユーティリティアプリ
このモジュールには、DICOM Softcopy Grayscale Presentation State Storage SOP Class 向けの高水準 API を実装するクラス群が含まれます。あわせて、プレゼンテーションステートのデモンストレータとして開発されたフリーの DICOM ビューア DICOMscope が使用する各種サポートクラスも含みます。詳しくは https://dicom.offis.de/en/dicomscope/ を参照してください。
主なインターフェイスクラスは次のとおりです。
ツール
このモジュールには次のコマンドラインツールが含まれます。
- dcmmkcrv: 画像に2次元曲線データを追加
- dcmmklut: DICOM ルックアップテーブルの作成
- dcmp2pgm: DICOM 画像とプレゼンテーションステートを読み込みビットマップを描画
- dcmprscp: DICOM Basic Grayscale Print Management の SCP
- dcmprscu: プレゼンテーションステートビューア用のプリントスプーラ
- dcmpschk: プレゼンテーションステートのチェックツール
- dcmpsmk: DICOM グレースケールソフトコピープレゼンテーションステートの作成
- dcmpsprt: DICOM 画像とプレゼンテーションステートを読み込みプリントジョブを描画
- dcmpsrcv: プレゼンテーションステートビューア用のネットワーク受信
- dcmpssnd: プレゼンテーションステートビューア用のネットワーク送信
例
次の例は、DICOM 画像から既定のプレゼンテーションステートを作成する方法を示します。
DcmFileFormat infile;
DcmFileFormat outfile;
if (infile.loadFile("image.dcm").good())
{
DVPresentationState pstate; // presentation state handler
if (pstate.createFromImage(*infile.getDataset()).good())
{
// serialize presentation state into DICOM data set structure
if (pstate.write(*outfile.getDataset(), OFFalse).good())
{
// and write to file
outfile.saveFile("gsps.dcm", EXS_LittleEndianExplicit);
}
}
}
次の例は、プレゼンテーションステートのグレースケール変換パイプラインを DICOM 画像に適用する方法を示します。
DcmFileFormat imagefile;
DcmFileFormat gspsfile;
if (imagefile.loadFile("image.dcm").good() &&
gspsfile.loadFile("gsps.dcm").good())
{
DVPresentationState pstate; // presentation state handler
if (pstate.read(*gspsfile.getDataset()).good()) // parse gsps object
{
// attach presentation state to image data
if (pstate.attachImage(&imagefile, OFFalse).good())
{
const void *pixel; // pointer to pixel data, one byte per pixel
unsigned long width; // width of image bitmap
unsigned long height; // height of image bitmap
if (pstate.getPixelData(pixel, width, height).good())
{
/ do something useful with the pixel data /
}
pstate.detachImage(); // release connection between GSPS and image
}
}
}