com.goldenhammer.dicom.dcm4che
Class CStoreImage

java.lang.Object
  extended bycom.goldenhammer.dicom.dcm4che.DCM4CHECommand
      extended bycom.goldenhammer.dicom.dcm4che.CStoreImage
All Implemented Interfaces:
Command, CStoreImageCommand

public class CStoreImage
extends DCM4CHECommand
implements Command, CStoreImageCommand

Implementation of the CStore command for the DCM4CHE DICOM Toolkit.


Field Summary
 
Fields inherited from class com.goldenhammer.dicom.dcm4che.DCM4CHECommand
aFactory, association, oFactory, properties
 
Constructor Summary
CStoreImage(java.util.Properties properties)
          Constructor
 
Method Summary
 void close()
          This method completes all necessary steps to close this command down
 void execute()
          Executes the CStore DICOM command using the DCM4CHE Toolkit.
 java.lang.String getImageUID()
          Returns the DICOM UID for the image being stored.
 void setHeaderData(DICOMHeaderData headerData)
          Sets new DICOM header data for the image being stored.
 void setImage(java.io.File imageFile)
          Sets the image for this command to store.
 
Methods inherited from class com.goldenhammer.dicom.dcm4che.DCM4CHECommand
close, openActiveAssociaton
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CStoreImage

public CStoreImage(java.util.Properties properties)
            throws java.io.IOException,
                   DCM4CHEException
Constructor

Parameters:
properties - the properties for this command to use
Throws:
java.io.IOException - thrown if there is problem connecting
DCM4CHEException - thrown if there is a problem with dcm4che connections
Method Detail

execute

public void execute()
             throws java.lang.Exception
Executes the CStore DICOM command using the DCM4CHE Toolkit.

Specified by:
execute in interface Command
Throws:
java.lang.Exception - if a problem occurs during execution
See Also:
Command.execute()

getImageUID

public java.lang.String getImageUID()
Returns the DICOM UID for the image being stored.

Returns:
the DICOM UID for the image being stored.

setHeaderData

public void setHeaderData(DICOMHeaderData headerData)
Sets new DICOM header data for the image being stored.

Specified by:
setHeaderData in interface CStoreImageCommand
Parameters:
headerData - the new header data for the image.

setImage

public void setImage(java.io.File imageFile)
              throws java.lang.Exception
Sets the image for this command to store.

Specified by:
setImage in interface CStoreImageCommand
Parameters:
imageFile - the file where the image is located
Throws:
java.io.IOException - if errors occur while reading the file
DCM4CHEException
java.lang.Exception - if any problems are encountered opening the file
See Also:
CStoreImageCommand.setImage(java.io.File)

close

public void close()
           throws java.lang.InterruptedException,
                  java.io.IOException
Description copied from interface: Command
This method completes all necessary steps to close this command down

Specified by:
close in interface Command
Throws:
java.io.IOException - thrown if this command cannot be closed
java.lang.InterruptedException - thrown if this command cannot be closed