33 #include "dcmtk/config/osconfig.h" 35 #include "dcmtk/ofstd/oflist.h" 36 #include "dcmtk/ofstd/ofstring.h" 37 #include "dcmtk/dcmqrdb/dcmqrdbi.h" 51 DVPSI_presentationState,
53 DVPSI_structuredReport,
57 DVPSI_hardcopyGrayscale
91 const DVIFhierarchyStatus status,
92 const DVPSInstanceType type,
136 Iterator = OldIterator =
List.end();
151 Iterator =
List.begin();
153 while (Iterator != last)
156 Iterator =
List.erase(Iterator);
159 Iterator = OldIterator =
List.end();
188 OFBool result = OFFalse;
189 Iterator =
List.begin();
191 while (Iterator != last)
210 OldIterator = Iterator;
211 Iterator =
List.begin();
212 return (Iterator !=
List.end());
222 if (Iterator != last)
224 return (Iterator != last);
234 OFBool result = OFFalse;
236 if (OldIterator != last)
238 Iterator = OldIterator;
253 OFBool result = OFFalse;
254 Iterator =
List.begin();
256 while (Iterator != last)
261 if (item->
UID == uid)
279 return (item != NULL) ? item->
Pos : 0;
289 return (item != NULL) ? item->
Status : DVIF_objectIsNew;
299 return (item != NULL) ? item->
Type : DVPSI_image;
309 return (item != NULL) ? item->
ImageSize : 0;
319 return (item != NULL) ? item->
Filename.
c_str() : (
const char *)NULL;
328 OFListConstIterator(
ItemStruct *) it = Iterator;
344 const DVIFhierarchyStatus status,
345 const DVPSInstanceType type,
350 List.push_back(item);
351 Iterator = --
List.end();
363 DVIFhierarchyStatus status = DVIF_objectIsNew;
371 case DVIF_objectIsNew:
372 if (status == DVIF_objectIsNotNew)
373 status = DVIF_objectContainsNewSubobjects;
375 case DVIF_objectIsNotNew:
376 case DVIF_objectContainsNewSubobjects:
378 status = DVIF_objectIsNotNew;
379 else if (status == DVIF_objectIsNew)
380 status = DVIF_objectContainsNewSubobjects;
426 const DVIFhierarchyStatus status = DVIF_objectIsNew,
427 const DVPSInstanceType type = DVPSI_image)
451 Iterator = OldIterator = List.
end();
466 Iterator = List.
begin();
468 while (Iterator != last)
471 Iterator = List.
erase(Iterator);
474 Iterator = OldIterator = List.
end();
503 OFBool result = OFFalse;
504 Iterator = List.
begin();
506 while (Iterator != last)
525 OldIterator = Iterator;
526 Iterator = List.
begin();
527 return (Iterator != List.
end());
537 if (Iterator != last)
539 return (Iterator != last);
549 OFBool result = OFFalse;
551 if (OldIterator != last)
553 Iterator = OldIterator;
568 OFBool result = OFFalse;
569 Iterator = List.
begin();
571 while (Iterator != last)
576 if (item->
UID == uid)
594 return (item != NULL) ? item->
Status : DVIF_objectIsNew;
604 return (item != NULL) ? item->
Type : DVPSI_image;
613 OFListConstIterator(
ItemStruct *) it = Iterator;
614 return (it != List.
end()) ? (*Iterator) : (
ItemStruct *)NULL;
624 const DVIFhierarchyStatus status = DVIF_objectIsNew)
628 Iterator = --List.
end();
640 DVIFhierarchyStatus status = DVIF_objectIsNew;
649 case DVIF_objectIsNew:
650 if (status == DVIF_objectIsNotNew)
651 status = DVIF_objectContainsNewSubobjects;
653 case DVIF_objectIsNotNew:
655 status = DVIF_objectIsNotNew;
656 else if (status == DVIF_objectIsNew)
657 status = DVIF_objectContainsNewSubobjects;
659 case DVIF_objectContainsNewSubobjects:
660 status = DVIF_objectContainsNewSubobjects;
705 const DVIFhierarchyStatus status = DVIF_objectIsNew)
725 Iterator = List.
end();
740 Iterator = List.
begin();
742 while (Iterator != last)
745 Iterator = List.
erase(Iterator);
748 Iterator = List.
end();
777 OFBool result = OFFalse;
778 Iterator = List.
begin();
780 while (Iterator != last)
800 Iterator = List.
begin();
801 return (Iterator != List.
end());
811 if (Iterator != last)
813 return (Iterator != last);
824 OFBool result = OFFalse;
825 Iterator = List.
begin();
827 while (Iterator != last)
832 if (item->
UID == uid)
850 return (item != NULL) ? item->
Status : DVIF_objectIsNew;
859 OFListConstIterator(
ItemStruct *) it = Iterator;
860 return (it != List.
end()) ? (*Iterator) : (
ItemStruct *)NULL;
870 const DVIFhierarchyStatus status = DVIF_objectIsNew)
874 Iterator = --List.
end();
DVInstanceCache()
Constructor.
ItemStruct(const OFString &uid, const DVIFhierarchyStatus status=DVIF_objectIsNew)
Constructor.
void clear()
reset all member variables to initial state.
const char * getFilename() const
gets filename of current (selected) instance
Uint32 getCount() const
gets number of cache entries
virtual ~DVInstanceCache()
Destructor.
DVPSInstanceType getType() const
gets type of all instances in the series
OFString Filename
filename of instance
void clear()
removes all elements from the list.
OFBool empty() const
checks whether instance cache is empty
DVIFhierarchyStatus getStatus() const
gets review status of the current (selected) series
DVIFhierarchyStatus Status
review status for the series
DVIFhierarchyStatus Status
review status for the series
OFBool gotoNext()
sets internal cursor to next position in cache list
OFListIterator(ItemStruct *) Iterator
internal cursor to current (selected) list item
ItemStruct * getItem() const
gets reference to current (selected) instance
OFBool gotoFirst()
sets internal cursor to first position in cache list
OFBool isElem(const OFString &uid)
checks whether an item with the specified UID exists in the cache list
DVInstanceCache List
list of instances within this series
OFList< ItemStruct * > List
list of instances
OFBool reset()
sets internal cursor to last visited position in cache list
ItemStruct(const OFString &uid, const DVIFhierarchyStatus status=DVIF_objectIsNew, const DVPSInstanceType type=DVPSI_image)
Constructor.
DVIFhierarchyStatus updateStatus()
updates hierarchical/review status for all list items.
DVPSInstanceType Type
type of instance
DVSeriesCache List
list of series within this study
ItemStruct(const OFString &uid, const int pos, const DVIFhierarchyStatus status, const DVPSInstanceType type, const int size, const OFString &filename)
Constructor.
OFBool reset()
sets internal cursor to last visited position in cache list
OFBool gotoItem(Uint32 idx)
sets internal cursor to specified position in cache list
void push_back(const T &x)
inserts after the last element of the list.
DVPSInstanceType Type
type of all instances within this series
A class to handle a series cache (list of items).
void addItem(const OFString &uid, const DVIFhierarchyStatus status=DVIF_objectIsNew)
adds a new item to the cache list.
ItemStruct * getItem() const
gets reference to current (selected) series
int Pos
position in the index file
OFBool gotoItem(Uint32 idx)
sets internal cursor to specified position in cache list
DVIFhierarchyStatus Status
review status
DVIFhierarchyStatus getStatus() const
gets review status of the current (selected) instance
OFBool gotoNext()
sets internal cursor to next position in cache list
OFBool gotoNext()
sets internal cursor to next position in cache list
A class to handle an instance cache (list of items).
Internal structure defining the list items.
Uint32 getCount() const
gets number of cache entries
OFBool gotoFirst()
sets internal cursor to first position in cache list
void addItem(const OFString &uid, const DVIFhierarchyStatus status=DVIF_objectIsNew)
adds a new item to the cache list.
void clear()
reset all member variables to initial state delete all list items.
void clear()
reset all member variables to initial state delete all list items.
int getPos() const
gets the file position of the current (selected) instance
virtual ~DVSeriesCache()
Destructor.
OFBool gotoFirst()
sets internal cursor to first position in cache list
A class to handle a study cache (list of items).
Internal structure defining the list items.
OFBool gotoItem(Uint32 idx)
sets internal cursor to specified position in cache list
double linked list template class.
OFString Label
instance label
OFBool empty() const
checks whether study cache is empty
virtual ~DVStudyCache()
Destructor.
OFString Description
instance description
ItemStruct * getItem() const
gets reference to current (selected) study
OFIterator< T > erase(OFIterator< T > position)
removes the element at the given position from the list.
OFList< ItemStruct * > List
list of referencing pstates
Internal structure defining the list items.
DVIFhierarchyStatus getStatus() const
gets review status of the current (selected) sstudy
a simple string class that implements a subset of std::string.
OFBool empty() const
returns true if list is empty.
OFBool isElem(const OFString &uid)
checks whether an item with the specified UID exists in the cache list
OFIterator< T > begin() const
returns an iterator referencing the first element in the list.
int getImageSize() const
gets image size of current (selected) instance
size_t size() const
returns number of elements in the list.
DVIFhierarchyStatus updateStatus()
updates hierarchical/review status for all list items.
OFBool empty() const
checks whether instance cache is empty
const char * c_str() const
returns a pointer to the initial element of an array of length size()+1 whose first size() elements e...
Uint32 getCount() const
gets number of cache entries
OFIterator< T > end() const
returns an iterator which points to the past-to-end element of the list.
DVSeriesCache()
Constructor.
DVStudyCache()
Constructor.
void addItem(const OFString &uid, const int pos, const DVIFhierarchyStatus status, const DVPSInstanceType type, const int size, const OFString &filename)
adds a new item to the cache list.
DVPSInstanceType getType() const
gets type of the instance
void updateStatus()
updates hierarchical/review status for all list items.
int ImageSize
image size (in bytes)
OFBool Checked
status flag to avoid double checking of referencing pstates
OFBool isElem(const OFString &uid)
checks whether an item with the specified UID exists in the cache list
OFList< ItemStruct * > List
list of studies
OFList< ItemStruct * > List
list of series