Kevin Archie avatar Kevin Archie committed ef29d00

assigment value should be evaluated on pre-modification object

Comments (0)

Files changed (3)

-  <version>2.1.1</version>
+  <version>2.1.2</version>
   <description>Language for modifying DICOM metadata</description>
+  <distributionManagement>
+    <repository>
+      <id>XNAT Server</id>
+      <name>XNAT Maven Library Release</name>
+      <url></url>
+    </repository>
+  </distributionManagement>


      * (non-Javadoc)
      * @see org.nrg.dcm.edit.Operation#makeAction(
-    public Action makeAction(final DicomObject o) throws AttributeException {
+    public Action makeAction(final DicomObject o) throws ScriptEvaluationException {
+        final String v = value.on(o);
         return new Action() {
             public void apply() throws ScriptEvaluationException {
                 try {
-                    o.putString(new int[]{tag}, o.vrOf(tag), value.on(o));
+                    o.putString(new int[]{tag}, o.vrOf(tag), v);
                 } catch (UnsupportedOperationException e) {
                     throw new ScriptEvaluationException("Unable to set attribute "
-                            + TagUtils.toString(tag) + " to \"" + value.on(o) + "\"", e);
+                            + TagUtils.toString(tag) + " to \"" + v + "\"", e);


      * @return
      * @throws AttributeException
-    Action makeAction(DicomObject o) throws AttributeException;
+    Action makeAction(DicomObject o) throws AttributeException,ScriptEvaluationException;
      * Compute the value that results from applying this Operation to
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.