Commit 16f6e550 authored by Fab's avatar Fab
Browse files

adapt to new dcmtk API

parent 77f80779
......@@ -219,10 +219,20 @@ OFCondition gkg::DcmtkDicomSCPImplementation::acceptAssociation( bool verbose )
ASC_dumpParameters( association->params, COUT );
DIC_AE callingTitle;
DIC_AE calledTitle;
#if OFFIS_DCMTK_VERSION_NUMBER >= 364
ASC_getAPTitles( association->params,
callingTitle,
sizeof( callingTitle ),
calledTitle,
sizeof( calledTitle ),
NULL,
0 );
#else
ASC_getAPTitles( association->params,
callingTitle,
calledTitle,
NULL );
#endif
CERR << "called AE : " << calledTitle << std::endl
<< "calling AE : " << callingTitle << std::endl;
......@@ -461,7 +471,13 @@ OFCondition gkg::DcmtkDicomSCPImplementation::acceptAssociation( bool verbose )
// acknowledge or reject this association
char buffer[ BUFSIZ ];
#if OFFIS_DCMTK_VERSION_NUMBER >= 364
condition = ASC_getApplicationContextName( association->params,
buffer,
sizeof( buffer ) );
#else
condition = ASC_getApplicationContextName( association->params, buffer );
#endif
if ( ( condition.bad() ) ||
strcmp( buffer, UID_StandardApplicationContext ) != 0 )
{
......@@ -538,10 +554,20 @@ OFCondition gkg::DcmtkDicomSCPImplementation::acceptAssociation( bool verbose )
// characters
DIC_AE callingTitle;
DIC_AE calledTitle;
#if OFFIS_DCMTK_VERSION_NUMBER >= 364
if ( ASC_getAPTitles( association->params,
callingTitle,
sizeof( callingTitle ),
calledTitle,
sizeof( calledTitle ),
NULL,
0 ).good() )
#else
if ( ASC_getAPTitles( association->params,
callingTitle,
calledTitle,
NULL ).good() )
#endif
{
_callingAETitle = "\"";
......@@ -1250,10 +1276,19 @@ void gkg::DcmtkDicomSCPImplementation::storeSCPCallback(
{
// which SOP class and SOP instance ?
#if OFFIS_DCMTK_VERSION_NUMBER >= 364
if ( !DU_findSOPClassAndInstanceInDataSet( *imageDataSet,
sopClass,
sizeof( sopClass ),
sopInstance,
sizeof( sopInstance ),
OFFalse ) )
#else
if ( !DU_findSOPClassAndInstanceInDataSet( *imageDataSet,
sopClass,
sopInstance,
OFFalse ) )
#endif
{
std::cerr << "GkgDicomServiceClassProvider: bad image file: "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment