00001 /* 00002 * 00003 * Copyright (C) 1996-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmwlm 00015 * 00016 * Author: Thomas Wilkens 00017 * 00018 * Purpose: Class for connecting to a file-based data source. 00019 * 00020 * Last Update: $Author: joergr $ 00021 * Update Date: $Date: 2010-10-14 13:16:39 $ 00022 * CVS/RCS Revision: $Revision: 1.17 $ 00023 * Status: $State: Exp $ 00024 * 00025 * CVS/RCS Log at end of file 00026 * 00027 */ 00028 00029 #ifndef WlmDataSourceFileSystem_h 00030 #define WlmDataSourceFileSystem_h 00031 00032 #include "dcmtk/config/osconfig.h" 00033 #include "dcmtk/dcmwlm/wlds.h" 00034 #include "dcmtk/dcmwlm/wlfsim.h" 00035 00036 //class WlmFileSystemInteractionManager; 00037 class DcmItem; 00038 class DcmDataset; 00039 class OFCondition; 00040 class DcmElement; 00041 class DcmItem; 00042 00046 class WlmDataSourceFileSystem : public WlmDataSource 00047 { 00048 protected: 00050 WlmFileSystemInteractionManager fileSystemInteractionManager; 00052 OFString dfPath; 00054 OFBool enableRejectionOfIncompleteWlFiles; 00056 int handleToReadLockFile; 00057 00062 OFBool SetReadlock(); 00063 00067 OFBool ReleaseReadlock(); 00068 00078 void HandleNonSequenceElementInResultDataset( DcmElement *element, unsigned long idx ); 00079 00089 void HandleSequenceElementInResultDataset( DcmElement *element, unsigned long idx ); 00090 00094 WlmDataSourceFileSystem( const WlmDataSourceFileSystem &Src ); 00095 00100 WlmDataSourceFileSystem &operator=( const WlmDataSourceFileSystem &Src ); 00101 00102 00103 public: 00106 WlmDataSourceFileSystem(); 00107 00110 ~WlmDataSourceFileSystem(); 00111 00115 OFCondition ConnectToDataSource(); 00116 00120 OFCondition DisconnectFromDataSource(); 00121 00125 void SetDfPath( const OFString& value ); 00126 00130 void SetEnableRejectionOfIncompleteWlFiles( OFBool value ); 00131 00139 OFBool IsCalledApplicationEntityTitleSupported(); 00140 00157 void HandleExistentButEmptyDescriptionAndCodeSequenceAttributes( DcmItem *dataset, const DcmTagKey &descriptionTagKey, const DcmTagKey &codeSequenceTagKey ); 00158 00170 void HandleExistentButEmptyReferencedStudyOrPatientSequenceAttributes( DcmDataset *dataset, const DcmTagKey &sequenceTagKey ); 00171 00184 WlmDataSourceStatusType StartFindRequest( const DcmDataset &findRequestIdentifiers ); 00185 00196 DcmDataset *NextFindResponse( WlmDataSourceStatusType &rStatus ); 00197 }; 00198 00199 #endif 00200 00201 /* 00202 ** CVS Log 00203 ** $Log: wldsfs.h,v $ 00204 ** Revision 1.17 2010-10-14 13:16:39 joergr 00205 ** Updated copyright header. Added reference to COPYRIGHT file. 00206 ** 00207 ** Revision 1.16 2006/12/15 14:49:21 onken 00208 ** Removed excessive use char* and C-array in favour of OFString and 00209 ** OFList. Simplified some implementation details. 00210 ** 00211 ** Revision 1.15 2005/12/08 16:05:41 meichel 00212 ** Changed include path schema for all DCMTK header files 00213 ** 00214 ** Revision 1.14 2005/05/04 11:33:17 wilkens 00215 ** Modified handling of the attributes ScheduledProcedureStepDescription/ 00216 ** ScheduledProtocolCodeSequence and RequestedProcedureDescription/ 00217 ** RequestedProcedureCodeSequence in wlmscpfs: in case one of the two attributes 00218 ** does not contain any information in a C-Find RSP message which is about to be 00219 ** sent to an SCU, the empty attribute will be removed from the C-Find RSP message 00220 ** before the message is sent, in order not to send an invalid RSP message. 00221 ** Added two command line options --enable-file-reject (default) and 00222 ** --disable-file-reject to wlmscpfs: these options can be used to enable or 00223 ** disable a file rejection mechanism which makes sure only complete worklist files 00224 ** will be used during the matching process. A worklist file is considered to be 00225 ** complete if it contains all necessary type 1 information which the SCP might 00226 ** have to return to an SCU in a C-Find response message. 00227 ** 00228 ** Revision 1.13 2004/05/26 10:36:53 meichel 00229 ** Fixed minor bug in worklist server regarding failed read locks. 00230 ** 00231 ** Revision 1.12 2004/01/07 08:32:28 wilkens 00232 ** Added new sequence type return key attributes to wlmscpfs. Fixed bug that for 00233 ** equally named attributes in sequences always the same value will be returned. 00234 ** Added functionality that also more than one item will be returned in sequence 00235 ** type return key attributes. 00236 ** 00237 ** Revision 1.11 2003/08/21 13:38:55 wilkens 00238 ** Moved declaration and initialization of member variables matchingDatasets and 00239 ** NumOfMatchingDatasets to base class. 00240 ** 00241 ** Revision 1.10 2003/07/02 09:17:55 wilkens 00242 ** Updated documentation to get rid of doxygen warnings. 00243 ** 00244 ** Revision 1.9 2002/12/16 11:08:34 wilkens 00245 ** Added missing #include "osconfig.h" to certain files. 00246 ** 00247 ** Revision 1.8 2002/12/09 13:40:49 joergr 00248 ** Renamed parameter to avoid name clash with global function index(). 00249 ** 00250 ** Revision 1.7 2002/08/12 10:56:08 wilkens 00251 ** Made some modifications in in order to be able to create a new application 00252 ** which contains both wlmscpdb and ppsscpdb and another application which 00253 ** contains both wlmscpfs and ppsscpfs. 00254 ** 00255 ** Revision 1.6 2002/08/05 09:09:57 wilkens 00256 ** Modfified the project's structure in order to be able to create a new 00257 ** application which contains both wlmscpdb and ppsscpdb. 00258 ** 00259 ** Revision 1.4 2002/07/17 13:10:17 wilkens 00260 ** Corrected some minor logical errors in the wlmscpdb sources and completely 00261 ** updated the wlmscpfs so that it does not use the original wlistctn sources 00262 ** any more but standard wlm sources which are now used by all three variants 00263 ** of wlmscps. 00264 ** 00265 ** Revision 1.3 2002/06/10 11:24:54 wilkens 00266 ** Made some corrections to keep gcc 2.95.3 quiet. 00267 ** 00268 ** Revision 1.2 2002/04/18 14:19:53 wilkens 00269 ** Modified Makefiles. Updated latest changes again. These are the latest 00270 ** sources. Added configure file. 00271 ** 00272 ** Revision 1.3 2002/01/08 17:45:34 joergr 00273 ** Reformatted source files (replaced Windows newlines by Unix ones, replaced 00274 ** tabulator characters by spaces, etc.) 00275 ** 00276 ** Revision 1.2 2002/01/08 16:47:53 joergr 00277 ** Added preliminary database support using OTL interface library (modified by 00278 ** MC/JR on 2001-12-21). 00279 ** 00280 ** Revision 1.1 2002/01/08 16:30:59 joergr 00281 ** Added new module "dcmwlm" developed by Thomas Wilkens (initial release for 00282 ** Windows, dated 2001-12-20). 00283 ** 00284 ** 00285 */