[med-svn] r20458 - trunk/packages/dicomscope/trunk/debian/patches
Gert Wollny
gert-guest at moszumanska.debian.org
Mon Nov 9 21:01:28 UTC 2015
Author: gert-guest
Date: 2015-11-09 21:01:27 +0000 (Mon, 09 Nov 2015)
New Revision: 20458
Modified:
trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp-dicom361.patch
Log:
Update interface patch to include more methods
Modified: trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp-dicom361.patch
===================================================================
--- trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp-dicom361.patch 2015-11-09 20:42:30 UTC (rev 20457)
+++ trunk/packages/dicomscope/trunk/debian/patches/DSRDocument.cpp-dicom361.patch 2015-11-09 21:01:27 UTC (rev 20458)
@@ -1,21 +1,249 @@
-Description: Use new dcmtk 3.6.1 interface for getAccessionNumber()
-Author: Gert Wollny <gw.fossdev at gmail.com>
-Forwarded: no
-
diff -ru dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp dicomscope-3.6.0.new/interface/libsrc/DSRDocument.cpp
--- dicomscope-3.6.0/interface/libsrc/DSRDocument.cpp 2015-11-03 12:18:18.000000000 +0100
-+++ dicomscope-3.6.0.new/interface/libsrc/DSRDocument.cpp 2015-11-03 12:22:21.783004384 +0100
-@@ -731,8 +731,11 @@
++++ dicomscope-3.6.0.new/interface/libsrc/DSRDocument.cpp 2015-11-09 22:00:14.363053534 +0100
+@@ -195,6 +195,13 @@
+ }
+
+
++#define GET_STRING_PROPERTY(getPropertyFunction) \
++ OFString value; \
++ OFCondition res = doc->getPropertyFunction(value, 0); \
++ if (res.bad()) return NULL; \
++ const char *string = value.c_str()
++
++
+ /*
+ * Class: J2Ci_jDSRDocument
+ * Method: getCompletionFlagDescription
+@@ -205,7 +212,7 @@
{
DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+- const char *string = doc->getCompletionFlagDescription();
++ GET_STRING_PROPERTY(getCompletionFlagDescription);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -323,7 +330,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getModality();
++ GET_STRING_PROPERTY(getModality);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -340,8 +347,8 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getSOPClassUID();
+-
++ GET_STRING_PROPERTY(getSOPClassUID);
++
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+ }
+@@ -357,7 +364,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getStudyInstanceUID();
++ GET_STRING_PROPERTY(getStudyInstanceUID);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -374,7 +381,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getSeriesInstanceUID();
++ GET_STRING_PROPERTY(getSeriesInstanceUID);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -391,7 +398,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getSOPInstanceUID();
++ GET_STRING_PROPERTY(getSOPInstanceUID);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -408,7 +415,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getInstanceCreatorUID();
++ GET_STRING_PROPERTY(getInstanceCreatorUID);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -425,7 +432,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getSpecificCharacterSet();
++ GET_STRING_PROPERTY(getSpecificCharacterSet);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -442,7 +449,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getPatientsName();
++ GET_STRING_PROPERTY(getPatientsName);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -459,7 +466,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getPatientsBirthDate();
++ GET_STRING_PROPERTY(getPatientsBirthDate);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -476,7 +483,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getPatientsSex();
++ GET_STRING_PROPERTY(getPatientsSex);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -493,7 +500,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getReferringPhysiciansName();
++ GET_STRING_PROPERTY(getReferringPhysiciansName);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -510,7 +517,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getStudyDescription();
++ GET_STRING_PROPERTY(getStudyDescription);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -527,7 +534,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getSeriesDescription();
++ GET_STRING_PROPERTY(getSeriesDescription);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -544,7 +551,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getManufacturer();
++ GET_STRING_PROPERTY(getManufacturer);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -561,7 +568,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getStudyDate();
++ GET_STRING_PROPERTY(getStudyDate);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -578,7 +585,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getStudyTime();
++ GET_STRING_PROPERTY(getStudyTime);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -595,7 +602,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getInstanceCreationDate();
++ GET_STRING_PROPERTY(getInstanceCreationDate);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -612,7 +619,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getInstanceCreationTime();
++ GET_STRING_PROPERTY(getInstanceCreationTime);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -629,7 +636,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getContentDate();
++ GET_STRING_PROPERTY(getContentDate);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -646,7 +653,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getContentTime();
++ GET_STRING_PROPERTY(getContentTime);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -663,7 +670,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getStudyID();
++ GET_STRING_PROPERTY(getStudyID);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -680,7 +687,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getPatientID();
++ GET_STRING_PROPERTY(getPatientID);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -714,7 +721,7 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
+- const char *string = doc->getInstanceNumber();
++ GET_STRING_PROPERTY(getInstanceNumber);
+
+ if (string == NULL) return NULL;
+ return env->NewStringUTF (string);
+@@ -731,8 +738,11 @@
+ {
+ DSRDocument *doc = getAddressOfDSRDocument (env, obj);
+
- const char *string = doc->getAccessionNumber();
-
+ OFString ofstring;
+ OFCondition res = doc->getAccessionNumber(ofstring, 0);
+ if (res.bad()) return NULL;
+
-+ const char *string = ofstring.c_str();
++ const char *string = ofstring-c_str();
if (string == NULL) return NULL;
return env->NewStringUTF (string);
}
More information about the debian-med-commit
mailing list