浏览代码

Stubs for tagCache mechanism

To be filled in with real functionality...
Steve Pieper 13 年之前
父节点
当前提交
354411a610
共有 1 个文件被更改,包括 19 次插入1 次删除
  1. 19 1
      Libs/DICOM/Core/ctkDICOMDatabase.h

+ 19 - 1
Libs/DICOM/Core/ctkDICOMDatabase.h

@@ -166,13 +166,31 @@ public:
   /// @param key A group,element tag in zero-filled hex
   /// @param group The group portion of the tag as an integer
   /// @param element The element portion of the tag as an integer
-  /// @Returns empty string is element is missing
+  /// @Returns empty string if element is missing
   Q_INVOKABLE QString instanceValue (const QString sopInstanceUID, const QString tag);
   Q_INVOKABLE QString instanceValue (const QString sopInstanceUID, const unsigned short group, const unsigned short element);
   Q_INVOKABLE QString fileValue (const QString fileName, const QString tag);
   Q_INVOKABLE QString fileValue (const QString fileName, const unsigned short group, const unsigned short element);
   bool tagToGroupElement (const QString tag, unsigned short& group, unsigned short& element);
 
+  ///
+  /// \brief store values of previously requested instance elements
+  /// These are meant to be internal methods used by the instanceValue and fileValue
+  /// methods, but they can be used by calling classes to populate or access
+  /// instance tag values as needed.
+  /// @param sopInstanceUID A string with the uid for a given instance
+  ///                       (corresponding file will be found via database)
+  /// @param key A group,element tag in zero-filled hex
+  /// @Returns empty string if element for uid is missing from cache
+  ///
+  /// Lightweight check of tag cache existence (once db check per runtime)
+  Q_INVOKABLE bool tagCacheExists (){};
+  /// Create a tagCache in the current database.  Delete the existing one if it exists.
+  Q_INVOKABLE bool initializeTagCache (){};
+  /// Return the value of a cached tag
+  Q_INVOKABLE QString cachedTag (const QString sopInstanceUID, const QString tag){};
+  Q_INVOKABLE bool cacheTag (const QString sopInstanceUID, const QString tag, const QString value){};
+
 
 Q_SIGNALS:
   void databaseChanged();