Class DICOM_Store

java.lang.Object
gov.nih.mipav.model.dicomcomm.DICOM_Store
All Implemented Interfaces:
Runnable

public class DICOM_Store extends Object implements 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 Details

    • classUID

      private String classUID
      Class UID.
    • fileName

      private final String fileName
      File name of the image to be stored.
    • frame

      private ViewJFrameDICOMQuery frame
      Reference to the Query/Retrieve GUI object.
    • instanceUID

      private String instanceUID
      The instance UID.
    • pdu

      private DICOM_PDUService pdu
      Protocol Data Units (PDU) object.
    • remoteAETitle

      private final String remoteAETitle
      The remote Application Entity Title.
    • transferSyntax

      private String transferSyntax
      The transfer syntax used when storing images.
  • Constructor Details

    • DICOM_Store

      public DICOM_Store(String _fileName, 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 Details

    • finalize

      public void finalize()
      DOCUMENT ME!
      Overrides:
      finalize in class Object
    • run

      public void run()
      Runs this move request in a separate thread.
      Specified by:
      run in interface Runnable
    • sendStoreRQ

      public boolean sendStoreRQ(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 String getFirstFile(String dir)
      DOCUMENT ME!
      Parameters:
      dir - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getUIDs

      private void getUIDs(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(File fileDir)
    • sendImages

      private boolean sendImages(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