반응형
#include "dcmtk/dcmnet/dstorscp.h"
void StartSCP()
{
OFList<OFString> ts;
ts.push_back(UID_LittleEndianExplicitTransferSyntax);
ts.push_back(UID_BigEndianExplicitTransferSyntax);
ts.push_back(UID_LittleEndianImplicitTransferSyntax);
ts.push_back(UID_DeflatedExplicitVRLittleEndianTransferSyntax);
DcmStorageSCP scp; // Create a new DcmStorageSCP object
scp.setAETitle("TESTSCP"); // Set AET to the AET specified by the C-MOVE operation
scp.setPort(3001); // Set the port number that storeSCP listens to, which needs to be consistent with the AET in the PACS configuration file
scp.setVerbosePCMode(OFTrue); // Set Verbose mode for debugging
scp.addPresentationContext(UID_CTImageStorage, ts); // Set the abstract syntax and transfer syntax of the receiving PC
scp.addPresentationContext(UID_ComputedRadiographyImageStorage, ts); // Set the abstract syntax and transfer syntax of the receiving PC
scp.addPresentationContext(UID_DigitalXRayImageStorageForPresentation, ts);
scp.setOutputDirectory("C:\\Workspace\\Received");
scp.setDatasetStorageMode(DcmStorageSCP::E_DatasetStorageMode::DGM_StoreToFile);
scp.setFilenameGenerationMode(DcmStorageSCP::E_FilenameGenerationMode::FGM_SOPInstanceUID);
scp.setFilenameExtension(".dcm");
scp.listen();
}
반응형
'[====== Development ======] > DICOM' 카테고리의 다른 글
DICOM UID 생성규칙 (0) | 2021.08.18 |
---|---|
[DCMTK] Send DICOM (0) | 2021.07.29 |
[DCMTK] decompress DICOM (0) | 2021.07.27 |
[DCMTK] Echo SCU (0) | 2021.07.27 |
Open Source DICOM Web Viewer (0) | 2021.07.07 |