📄 wlfsim.h
字号:
/*** Copyright (C) 1996-2005, OFFIS** This software and supporting documentation were developed by** Kuratorium OFFIS e.V.* Healthcare Information and Communication Systems* Escherweg 2* D-26121 Oldenburg, Germany** THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY* REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR* FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR* ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND* PERFORMANCE OF THE SOFTWARE IS WITH THE USER.** Module: dcmwlm** Author: Thomas Wilkens** Purpose: Class for managing file system interaction.** Last Update: $Author: meichel $* Update Date: $Date: 2005/12/08 16:05:42 $* Source File: $Source: /share/dicom/cvs-depot/dcmtk/dcmwlm/include/dcmtk/dcmwlm/wlfsim.h,v $* CVS/RCS Revision: $Revision: 1.11 $* Status: $State: Exp $** CVS/RCS Log at end of file**/#ifndef WlmFileSystemInteractionManager_h#define WlmFileSystemInteractionManager_h#include "dcmtk/config/osconfig.h"template <class T> class OFOrderedSet;class DcmTagKey;class OFConsole;class OFCondition;/** This class encapsulates data structures and operations for managing * data base interaction in the framework of the DICOM basic worklist * management service. */class WlmFileSystemInteractionManager{ private: /** Privately defined copy constructor. * @param old Object which shall be copied. */ WlmFileSystemInteractionManager(const WlmFileSystemInteractionManager &old); /** Privately defined assignment operator. * @param obj Object which shall be copied. */ WlmFileSystemInteractionManager &operator=(const WlmFileSystemInteractionManager &obj); protected: /// indicates if the application is run in verbose mode OFBool verboseMode; /// indicates if the application is run in debug mode OFBool debugMode; /// stream logging information will be dumped to OFConsole *logStream; /// path to database files char *dfPath; /// indicates if wl-files which are lacking return type 1 attributes or information in such attributes shall be rejected or not OFBool enableRejectionOfIncompleteWlFiles; /// called AE title char *calledApplicationEntityTitle; /// array of matching records DcmDataset **matchingRecords; /// number of array fields unsigned long numOfMatchingRecords; /** This function dumps the given information on a stream. * Used for dumping information in normal, debug and verbose mode. * @param message The message to dump. */ void DumpMessage( const char *message ); /** This function determines all worklist files in the directory specified by * dfPath and calledApplicationEntityTitle, and returns the complete path and * filename information in an array of strings. * @param worklistFiles Set of strings, each specifying path and filename to one worklist file. */ void DetermineWorklistFiles( OFOrderedSet<OFString> &worklistFiles ); /** This function returns OFTrue if the given filename refers to a worklist file, * i.e. has an extension of ".wl". * @param fname The name of the file. * @return OFTrue in case the given filename refers to a worklist file, OFFalse otherwise. */ OFBool IsWorklistFile( const char *fname ); /** This function checks if the given dataset (which represents the information from a * worklist file) contains all necessary return type 1 information. According to the * DICOM standard part 4 annex K, the following attributes are type 1 attributes in * C-Find RSP messages: * Attribute Tag Return Key Type * SpecificCharacterSet (0008,0005) 1C (will be checked in WlmDataSourceFileSystem::StartFindRequest(...); this attribute does not have to be checked here) * ScheduledProcedureStepSequence (0040,0100) 1 * > ScheduledStationAETitle (0040,0001) 1 * > ScheduledProcedureStepStartDate (0040,0002) 1 * > ScheduledProcedureStepStartTime (0040,0003) 1 * > Modality (0008,0060) 1 * > ScheduledProcedureStepDescription (0040,0007) 1C (The ScheduledProcedureStepDescription (0040,0007) or the ScheduledProtocolCodeSequence (0040,0008) or both shall be supported by the SCP; we actually support both, so we have to check if at least one of the two attributes contains valid information.) * > ScheduledProtocolCodeSequence (0040,0008) 1C (see abobve) * > > CodeValue (0008,0100) 1 * > > CodingSchemeDesignator (0008,0102) 1 * > ScheduledProcedureStepID (0040,0009) 1 * RequestedProcedureID (0040,1001) 1 * RequestedProcedureDescription (0032,1060) 1C (The RequestedProcedureDescription (0032,1060) or the RequestedProcedureCodeSequence (0032,1064) or both shall be supported by the SCP; we actually support both, so we have to check if at least one of the two attributes contains valid information.) * RequestedProcedureCodeSequence (0032,1064) 1C (see abobve) * > > CodeValue (0008,0100) 1 * > > CodingSchemeDesignator (0008,0102) 1 * StudyInstanceUID (0020,000D) 1 * ReferencedStudySequence (0008,1110) 2 * > ReferencedSOPClassUID (0008,1150) 1C (Required if a sequence item is present) * > ReferencedSOPInstanceUID (0008,1155) 1C (Required if a sequence item is present) * ReferencedPatientSequence (0008,1120) 2 * > ReferencedSOPClassUID (0008,1150) 1C (Required if a sequence item is present) * > ReferencedSOPInstanceUID (0008,1155) 1C (Required if a sequence item is present) * PatientsName (0010,0010) 1 * PatientID (0010,0020) 1 * @param dataset - [in] The dataset of the worklist file which is currently examined. * @return OFTrue in case the given dataset contains all necessary return type 1 information, * OFFalse otherwise. */ OFBool DatasetIsComplete( DcmDataset *dataset ); /** This function checks if the specified sequence attribute is absent or existent but non-empty * and incomplete in the given dataset. * @param sequenceTagKey The sequence attribute which shall be checked. * @param dset The dataset in which the attribute is contained. * @return OFTrue in case the sequence attribute is absent or existent but non-empty and incomplete, OFFalse otherwise. */ OFBool ReferencedStudyOrPatientSequenceIsAbsentOrExistentButNonEmptyAndIncomplete( DcmTagKey sequenceTagKey, DcmItem *dset ); /** This function checks if the specified description and code sequence attribute are both incomplete in the given dataset. * @param descriptionTagKey The description attribute which shall be checked. * @param codeSequenceTagKey The codeSequence attribute which shall be checked. * @param dset The dataset in which the attributes are contained. * @return OFTrue in case both attributes are incomplete, OFFalse otherwise. */ OFBool DescriptionAndCodeSequenceAttributesAreIncomplete( DcmTagKey descriptionTagKey, DcmTagKey codeSequenceTagKey, DcmItem *dset ); /** This function checks if the specified attribute is absent or contains an empty value in the given dataset. * @param elemTagKey The attribute which shall be checked. * @param dset The dataset in which the attribute is contained. * @return OFTrue in case the attribute is absent or contains an empty value, OFFalse otherwise. */ OFBool AttributeIsAbsentOrEmpty( DcmTagKey elemTagKey, DcmItem *dset ); /** This function returns OFTrue, if the matching key attribute values in the * dataset match the matching key attribute values in the search mask. * @param dataset The dataset which shall be checked. * @param searchMask The search mask. * @return OFTrue in case the dataset matches the search mask in the matching key attribute values, OFFalse otherwise. */ OFBool DatasetMatchesSearchMask( DcmDataset *dataset, DcmDataset *searchMask ); /** This function determines the values of the matching key attributes in the given dataset. * @param dataset Dataset from which the values shall be extracted. * @param matchingKeyAttrValues Contains in the end the values of the matching key * attributes in the search mask. Is an array of pointers. */ void DetermineMatchingKeyAttributeValues( DcmDataset *dataset, const char **&matchingKeyAttrValues ); /** This function returns OFTrue if the dataset's and the search mask's values in * attribute scheduled station AE title match; otherwise OFFalse will be returned. * @param datasetValue Value for the corresponding attribute in the dataset; might be NULL. * @param searchMaskValue Value for the corresponding attribute in the search mask; never NULL. * @return OFTrue if the values match, OFFalse otherwise. */ OFBool ScheduledStationAETitlesMatch( const char *datasetValue, const char *searchMaskValue );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -