   ([idx]
     (get-msp nil idx)))
 
+
+(defn add-msp
+  "Add a MultiStagePosition object to the position list."
+  ([position-list label x y z]
+    (.addPosition position-list
+                  (doto
+                    (MultiStagePosition.
+                      (core getXYStageDevice) x y
+                      (core getFocusDevice) z)
+                    (.setLabel label))))
+  ([label x y z]
+    (add-msp (.getPositionList gui) label x y z)))
+
+(defn remove-msp
+  ([position-list idx]
+    (.removePosition position-list idx))
+  ([idx]
+    (remove-msp (.getPositionList gui) idx)))
+
 (defn get-msp-z-position
   "Get the z position for a given z-stage from the MultiStagePosition
    with the given index in the Position List."

  [dev prop]
  [[dev prop] (get-property-value dev prop)])

(defn get-allowed-property-values
  "Returns a sequence of the allowed property values
   for a give device and property."

  ([idx z-stage z]
    (set-msp-z-position nil idx z-stage z)))  

(defn positions-map [position-list]
  (let [position (map MultiStagePosition-to-map (get-positions))]
    (zipmap
      (map :label position)
      (map :axes position))))

(defn swig-vector-contents
  "Returns a string containing all values in a swig vector
   with spaces in between."
