Package gov.nih.mipav.model.dicomcomm
Class DICOM_Store
- java.lang.Object
-
- gov.nih.mipav.model.dicomcomm.DICOM_Store
-
- All Implemented Interfaces:
java.lang.Runnable
public class DICOM_Store extends java.lang.Object implements java.lang.Runnable
This is the DICOM store class that defines functions to compose and send a store request to a DICOM image file archive such as 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: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/
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
classUID
Class UID.private java.lang.String
fileName
File name of the image to be stored.private ViewJFrameDICOMQuery
frame
Reference to the Query/Retrieve GUI object.private java.lang.String
instanceUID
The instance UID.private DICOM_PDUService
pdu
Protocol Data Units (PDU) object.private java.lang.String
remoteAETitle
The remote Application Entity Title.private java.lang.String
transferSyntax
The transfer syntax used when storing images.
-
Constructor Summary
Constructors Constructor Description DICOM_Store(java.lang.String _fileName, java.lang.String _remoteAETitle, ViewJFrameDICOMQuery _frame)
Creates a new DICOM_Store object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
DOCUMENT ME!private void
getDirUIDs(java.io.File fileDir)
private java.lang.String
getFirstFile(java.lang.String dir)
DOCUMENT ME!private void
getUIDs(java.lang.String file)
Read in the DICOM file and parses the header to find the UIDs needed to send the image.void
run()
Runs this move request in a separate thread.private boolean
sendImages(java.lang.String dir)
Recursily desends the directory tree to send the images.boolean
sendStoreRQ(java.lang.String fileName)
Reads in the DICOM image file from disk, composes a DICOM C-Store request and sends the request.
-
-
-
Field Detail
-
classUID
private java.lang.String classUID
Class UID.
-
fileName
private final java.lang.String fileName
File name of the image to be stored.
-
frame
private ViewJFrameDICOMQuery frame
Reference to the Query/Retrieve GUI object.
-
instanceUID
private java.lang.String instanceUID
The instance UID.
-
pdu
private DICOM_PDUService pdu
Protocol Data Units (PDU) object.
-
remoteAETitle
private final java.lang.String remoteAETitle
The remote Application Entity Title.
-
transferSyntax
private java.lang.String transferSyntax
The transfer syntax used when storing images.
-
-
Constructor Detail
-
DICOM_Store
public DICOM_Store(java.lang.String _fileName, java.lang.String _remoteAETitle, ViewJFrameDICOMQuery _frame)
Creates a new DICOM_Store object.- Parameters:
_fileName
- file name of the images_remoteAETitle
- remote application entity name_frame
- MIPAV's query frame
-
-
Method Detail
-
finalize
public void finalize()
DOCUMENT ME!- Overrides:
finalize
in classjava.lang.Object
-
run
public void run()
Runs this move request in a separate thread.- Specified by:
run
in interfacejava.lang.Runnable
-
sendStoreRQ
public boolean sendStoreRQ(java.lang.String fileName)
Reads in the DICOM image file from disk, composes a DICOM C-Store request and sends the request.- Parameters:
fileName
- name of DICOM image file- Returns:
- true if the method succeeded in sending all images else false
-
getFirstFile
private java.lang.String getFirstFile(java.lang.String dir)
DOCUMENT ME!- Parameters:
dir
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getUIDs
private void getUIDs(java.lang.String file)
Read in the DICOM file and parses the header to find the UIDs needed to send the image.- Parameters:
fileName
- DICOM file to be read.
-
getDirUIDs
private void getDirUIDs(java.io.File fileDir)
-
sendImages
private boolean sendImages(java.lang.String dir)
Recursily desends the directory tree to send the images. This is a patient level is specified as the directly, all studies, series, and images for that patient are sent- Parameters:
dir
- directory of where images to be sent are located- Returns:
- true is the method succeed in sending all images else false
-
-