반응형
#include "stdafx.h"
#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmnet/scu.h"
#include "dcmtk/dcmdata/dcdatset.h"
#include "dcmtk/dcmdata/dcelem.h"
#include "dcmtk/dcmdata/dcuid.h"
#include "dcmtk/dcmdata/dcvrul.h"
int main(int argc, char* argv[])
{
DcmSCU scu;
OFCondition cond;
// Set the peer hostname and port number
cond = scu.setPeerHostName("printscp.example.com");
if (cond.bad())
{
// Handle error
}
cond = scu.setPeerPort(104);
if (cond.bad())
{
// Handle error
}
// Set the printer name
DcmDataset dataset;
dataset.putAndInsertString(DcmTagKey(0x2110, 0x0010), "Printer1");
// Set the film size and orientation
dataset.putAndInsertString(DcmTagKey(0x2010, 0x0040), "STANDARD\\11INX14IN");
dataset.putAndInsertString(DcmTagKey(0x2010, 0x0050), "LANDSCAPE");
// Set the print layout
dataset.putAndInsertUint16(DcmTagKey(0x2010, 0x0100), 1);
// Send the print job
cond = scu.sendPrintJob(dataset);
if (cond.bad())
{
// Handle error
}
return 0;
}
반응형
'[====== Development ======] > DICOM' 카테고리의 다른 글
DCMTK DcmSCU Example (0) | 2024.01.05 |
---|---|
DCMTK on Linux (0) | 2022.08.02 |
c# fo-dicom Add Sequence Tag (0) | 2022.06.15 |
[DCMTK] JPEG 압축 (0) | 2022.06.10 |
DICOM DOSE SR 관련 자료 (0) | 2021.09.24 |