org.dicom4j.io.media
Class DicomFile

java.lang.Object
  extended by java.io.File
      extended by org.dicom4j.io.media.DicomFile
All Implemented Interfaces:
Serializable, Comparable<File>
Direct Known Subclasses:
DicomDir

public class DicomFile
extends File

class to Read/Write DICOM files stored on a FileSystem (extends the java's File by adding specifics methods for Dicom files)

Since:
0.0.0
Author:
Laurent Lecomte
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
DicomFile(File aFile)
          creates a new file
DicomFile(String aAbsolutePath)
          creates a new file
 
Method Summary
 void close()
           
 boolean containFileMetaInformation()
           
 DataSet getDataset()
          get the DataSet
 FileMetaInformation getFileMetaInformation()
          get the FileMetaInformation
 TransferSyntaxFactory getTransferSyntaxFactory()
          return the current factory
 boolean isOpen()
          return true if currently open
 void open()
          Open the File
 void save()
           
 void save(TransferSyntax transferSyntax)
           
 void setTransferSyntaxFactory(TransferSyntaxFactory transferSyntaxFactory)
          set the TransferSyntaxFactory to use.
 
Methods inherited from class java.io.File
canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DicomFile

public DicomFile(File aFile)
creates a new file

Parameters:
aFile - the File

DicomFile

public DicomFile(String aAbsolutePath)
creates a new file

Parameters:
aAbsolutePath - the AbsolutePath
Method Detail

close

public void close()
           throws IOException,
                  DicomException
Throws:
IOException
DicomException

getDataset

public DataSet getDataset()
get the DataSet

Returns:
the DataSet

getFileMetaInformation

public FileMetaInformation getFileMetaInformation()
get the FileMetaInformation

Returns:
the FileMetaInformation

containFileMetaInformation

public boolean containFileMetaInformation()

isOpen

public boolean isOpen()
return true if currently open

Returns:
true if open

open

public void open()
          throws IOException,
                 DicomException,
                 Exception
Open the File

Throws:
IOException
DicomException
Exception

save

public void save()
          throws IOException,
                 DicomException,
                 Exception
Throws:
IOException
DicomException
Exception

save

public void save(TransferSyntax transferSyntax)
          throws IOException,
                 DicomException
Throws:
IOException
DicomException

getTransferSyntaxFactory

public TransferSyntaxFactory getTransferSyntaxFactory()
return the current factory

Returns:

setTransferSyntaxFactory

public void setTransferSyntaxFactory(TransferSyntaxFactory transferSyntaxFactory)
set the TransferSyntaxFactory to use.

the factory is used to get a TransferSyntax depending of the Transfer Syntax UID Element of the FileMetaInformation

Parameters:
transferSyntaxFactory - the factory


Copyright © 2009 dicom4j. All Rights Reserved.