Package gov.nih.mipav.model.dicomcomm
Class DICOM_Query
java.lang.Object
gov.nih.mipav.model.dicomcomm.DICOM_SOP
gov.nih.mipav.model.dicomcomm.DICOM_Query
- All Implemented Interfaces:
Runnable
This is the DICOM query class that defines functions to compose and send a patient root, patient level DICOM query
request to the image file server located in NIH's Clinical Center.
This DICOM communication package was originally based on the Java Dicom Package, whose license is below:
This DICOM communication package was originally based on the Java Dicom Package, whose license is below:
Java Dicom Package (com.zmed.dicom) Copyright (c) 1996-1997 Z Medical Imaging Systems, Inc. This software is provided, as is, for non-commercial educational purposes only. Use or incorporation of this software or derivative works in commercial applications requires written consent from Z Medical Imaging Systems, Inc. Z MEDICAL IMAGING SYSTEMS MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR CONFORMANCE TO ANY SPECIFICATION OR STANDARD. Z MEDICAL IMAGING SYSTEMS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING OR MODIFYING THIS SOFTWARE OR ITS DERIVATIVES. ============================================================================= This software package is implemented similarly to the UC Davis public domain C++ DICOM implementation which contains the following copyright notice: Copyright (C) 1995, University of California, Davis THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND THE UNIVERSITY OF CALIFORNIA DOES NOT MAKE ANY WARRANTY ABOUT 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. Copyright of the software and supporting documentation is owned by the University of California, and free access is hereby granted as a license to use this software, copy this software and prepare derivative works based upon this software. However, any distribution of this software source code or supporting documentation or derivative works (source code and supporting documentation) must include this copyright notice. The UC Davis C++ source code is publicly available from the following anonymous ftp site: ftp://imrad.ucdmc.ucdavis.edu/pub/dicom/UCDMC/
- Version:
- 1.0
- Author:
- Sunita Munjal
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIf true then the DICOM query is cancelled.cFind request object.CResponse (Find response) object.private DICOM_ObjectThe DICOM data object.private booleanBoolean that tells the thread whether or not it should keep going.protected intThe DICOM message ID.The PDU service object.private ViewJFrameDICOMQueryThe GUI frame to starting queries.private intIndicates the type of query (i.e. -
Constructor Summary
ConstructorsConstructorDescriptionDICOM_Query constructor.DICOM_Query(ViewJFrameDICOMQuery _queryFrame, int _type) DICOMQuery constructor. -
Method Summary
Modifier and TypeMethodDescriptionconnectToServer(String AETitle) Connects to the server with an Application Entity title provided.intgetMsgID()getMsgID - This returns the msgID for the outgoing C-Move Request.voidrun()Runs this query in a separate thread.voidsendFindCancelRQ(int msgID, DICOM_PDUService pdu) Send a C-CANCEL-FIND-RQ to the Service Class Provider;ie.voidsendQuery(DICOM_PDUService pdu, DICOM_Object ddo) Sends patient root query to remote DICOM Q/R server.intsetMsgID()This sets the unique msgID for the outgoing C-Move Request.voidsetParameters(DICOM_PDUService pdu, DICOM_Object ddo) Sets up the neccessary parameters for sending a query.voidsetPatientRootQuery - sets query to Patient Root.voidsetPatientStudyOnlyQuery - sets query to Patient Study Only.setQueryImagesData(String patientID, String studyInstUID, String seriesInstUID) Sets up the data object (IOD) for a patient root image level C-Find request on key patient ID.setQueryPatientData(String patientName, String patientID) Sets up the data object (IOD) for a patient root patient level C-Find request on key patient name.setQuerySeriesData(String patientID, String studyInstUID) Sets up the data object (IOD) for a patient root series level C-Find request on key patient ID.setQueryStudyData(String patientID, String studyID) Sets up the data object (IOD) for a patient root study level C-Find request on key patient ID.setQueryStudyData(String patientName, String patientID, String studyID, String studyDate, String referringPhys) Sets up the data object (IOD) for a patient root study level C-Find request on key patient ID.voidsetStop()Tells the thread to stop (does not call thread.stop(): unsafe).voidSets query to Study Root.voidwrite(DICOM_PDUService pdu, DICOM_Object ddo) Writes a query.Methods inherited from class gov.nih.mipav.model.dicomcomm.DICOM_SOP
verifySOPClass
-
Field Details
-
cFindRq
cFind request object. -
cFindRsp
CResponse (Find response) object. -
MSG_ID
protected int MSG_IDThe DICOM message ID. -
cancelFlag
private boolean cancelFlagIf true then the DICOM query is cancelled. -
ddo
The DICOM data object. -
keepGoing
private boolean keepGoingBoolean that tells the thread whether or not it should keep going. -
pdu
The PDU service object. -
queryFrame
The GUI frame to starting queries. -
queryType
private int queryTypeIndicates the type of query (i.e. STUDY, SERIES ...)
-
-
Constructor Details
-
DICOM_Query
public DICOM_Query()DICOM_Query constructor. -
DICOM_Query
DICOMQuery constructor.- Parameters:
_queryFrame- reference the query frame_type- type of query (i.e. STUDY, SERIES ...)
-
-
Method Details
-
connectToServer
Connects to the server with an Application Entity title provided.- Parameters:
AETitle- application entity title for remote server- Returns:
- pdu return instance of PDU_Service class which contains the remote system connect info.
-
getMsgID
public int getMsgID()getMsgID - This returns the msgID for the outgoing C-Move Request.- Returns:
- msgID uniquely identifies the current C-Move RQ
-
run
public void run()Runs this query in a separate thread. Calls sendQuery. -
sendFindCancelRQ
Send a C-CANCEL-FIND-RQ to the Service Class Provider;ie. Image Archive- Parameters:
msgID- unique identifier for the current messagepdu- instance of PDU_Service containing remote connect info.
-
sendQuery
Sends patient root query to remote DICOM Q/R server.- Parameters:
pdu- instance of PDU_Service containing remote connect info.ddo- patient root query data object
-
setMsgID
public int setMsgID()This sets the unique msgID for the outgoing C-Move Request.- Returns:
- msgID uniquely identifies the current C-Move RQ
-
setParameters
Sets up the neccessary parameters for sending a query. Must be called before the thread is started.- Parameters:
pdu- instance of PDU_Service containing remote connect info.ddo- move request identifier
-
setPatientRootQuery
public void setPatientRootQuery()setPatientRootQuery - sets query to Patient Root. -
setPatientStudyOnlyQuery
public void setPatientStudyOnlyQuery()setPatientStudyOnlyQuery - sets query to Patient Study Only. -
setQueryImagesData
Sets up the data object (IOD) for a patient root image level C-Find request on key patient ID.- Parameters:
patientID- key attribute for image level querystudyInstUID- key attribute for image level queryseriesInstUID- key attribute for image level query- Returns:
- return patient root image level query data object
-
setQueryPatientData
Sets up the data object (IOD) for a patient root patient level C-Find request on key patient name.- Parameters:
patientName- a key attribute for querypatientID- a key attribute for query - can be empty string- Returns:
- return patient root patient level query data object
-
setQuerySeriesData
Sets up the data object (IOD) for a patient root series level C-Find request on key patient ID.- Parameters:
patientID- key attribute for study level querystudyInstUID- key attribute for series level query- Returns:
- return patient root series level query data object
-
setQueryStudyData
Sets up the data object (IOD) for a patient root study level C-Find request on key patient ID.- Parameters:
patientID- key attribute for study level querystudyID- key attribute for study level query/ can be empty string ""- Returns:
- return patient root study level query data object
-
setQueryStudyData
public DICOM_Object setQueryStudyData(String patientName, String patientID, String studyID, String studyDate, String referringPhys) Sets up the data object (IOD) for a patient root study level C-Find request on key patient ID.- Parameters:
patientName- DOCUMENT ME!patientID- key attribute for study level querystudyID- key attribute for study level query/ can be empty string ""studyDate- DOCUMENT ME!referringPhys- DOCUMENT ME!- Returns:
- return patient root study level query data object
-
setStop
public void setStop()Tells the thread to stop (does not call thread.stop(): unsafe). -
setStudyRootQuery
public void setStudyRootQuery()Sets query to Study Root. -
write
Writes a query.- Parameters:
pdu- instance of PDU_Serviceddo- DOCUMENT ME!- Throws:
DICOM_Exception- anything goes wrong
-