how to save study using dcmtk.3.6.0/3.6.1
Moderator: Moderator Team
how to save study using dcmtk.3.6.0/3.6.1
hi,
I want to find study from dicom server and store on local drive.how should I do it using dcmtk 3.6.0/3.6.1? but without using movescu..I need programatically.
I want to find study from dicom server and store on local drive.how should I do it using dcmtk 3.6.0/3.6.1? but without using movescu..I need programatically.
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: how to save study using dcmtk.3.6.0/3.6.1
What about using the DcmSCU class? Here's an example: http://support.dcmtk.org/wiki/dcmtk/how ... cu-example
Re: how to save study using dcmtk.3.6.0/3.6.1
but how to store image on hard drive? I'm not getting the code.
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: how to save study using dcmtk.3.6.0/3.6.1
For C-MOVE, you need a separate Storage SCP, e.g. the one implemented by the new DcmStorageSCP class.
For C-GET, the DcmSCU class should provide everything you need...
For C-GET, the DcmSCU class should provide everything you need...
Re: how to save study using dcmtk.3.6.0/3.6.1
please can you provide a simple code to store image?
-
- DCMTK Developer
- Posts: 2506
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: how to save study using dcmtk.3.6.0/3.6.1
Look into the source code of dcmrecv!
Here the relevant part:
Here the relevant part:
Code: Select all
/* start with the real work */
DcmStorageSCP storageSCP;
OFCondition status;
OFLOG_INFO(dcmrecvLogger, "configuring service class provider ...");
/* set general network parameters */
storageSCP.setPort(opt_port);
storageSCP.setAETitle(opt_aeTitle);
storageSCP.setMaxReceivePDULength(opt_maxPDULength);
storageSCP.setACSETimeout(opt_acseTimeout);
storageSCP.setDIMSETimeout(opt_dimseTimeout);
storageSCP.setDIMSEBlockingMode(opt_blockingMode);
storageSCP.setVerbosePCMode(opt_showPresentationContexts);
storageSCP.setRespondWithCalledAETitle(opt_useCalledAETitle);
storageSCP.setHostLookupEnabled(opt_HostnameLookup);
storageSCP.setDirectoryGenerationMode(opt_directoryGeneration);
storageSCP.setFilenameGenerationMode(opt_filenameGeneration);
storageSCP.setFilenameExtension(opt_filenameExtension);
storageSCP.setDatasetStorageMode(opt_datasetStorage);
/* load association negotiation profile from configuration file (if specified) */
if ((opt_configFile != NULL) && (opt_profileName != NULL))
{
status = storageSCP.loadAssociationConfiguration(opt_configFile, opt_profileName);
if (status.bad())
{
OFLOG_FATAL(dcmrecvLogger, "cannot load association configuration: " << status.text());
return EXITCODE_INVALID_ASSOCIATION_CONFIG;
}
} else {
/* report a warning message that the SCP will not accept any Storage SOP Classes */
OFLOG_WARN(dcmrecvLogger, "no configuration file specified, SCP will only support the Verification SOP Class");
}
/* specify the output directory (also checks whether directory exists and is writable) */
status = storageSCP.setOutputDirectory(opt_outputDirectory);
if (status.bad())
{
OFLOG_FATAL(dcmrecvLogger, "cannot specify output directory: " << status.text());
return EXITCODE_INVALID_OUTPUT_DIRECTORY;
}
OFLOG_INFO(dcmrecvLogger, "starting service class provider and listening ...");
/* start SCP and listen on the specified port */
status = storageSCP.listen();
if (status.bad())
{
OFLOG_FATAL(dcmrecvLogger, "cannot start SCP and listen on port " << opt_port << ": " << status.text());
return EXITCODE_CANNOT_START_SCP_AND_LISTEN;
}
Re: how to save study using dcmtk.3.6.0/3.6.1
thank you..I will try...
Re: how to save study using dcmtk.3.6.0/3.6.1
still I am unable to get file from pacs server
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest