Class AlgorithmDICOMtoAVI

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmDICOMtoAVI
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmDICOMtoAVI extends AlgorithmBase
Recursively traverses a directory and its subfolders, converting all 3D DICOM files to AVI with MP42 Compression.
Version:
1.0
Author:
Ben Link
  • Field Details

    • compression

      private int compression
      DOCUMENT ME!
    • dirPath

      private String dirPath
      Directory to recursively operate in.
    • fileIO

      private FileIO fileIO
      DOCUMENT ME!
    • outputPath

      private String outputPath
      Output path to build new tree.
    • quality

      private float quality
      DOCUMENT ME!
  • Constructor Details

    • AlgorithmDICOMtoAVI

      public AlgorithmDICOMtoAVI(String dir, String outputDir, int compression)
      Default Constructor.
      Parameters:
      dir - full pathname of directory to traverse
      outputDir - DOCUMENT ME!
      compression - DOCUMENT ME!
  • Method Details

    • runAlgorithm

      public void runAlgorithm()
      DOCUMENT ME!
      Specified by:
      runAlgorithm in class AlgorithmBase
    • setQuality

      public void setQuality(float q)
      DOCUMENT ME!
      Parameters:
      q - DOCUMENT ME!
    • addFilesToVector

      private void addFilesToVector(String name, Vector<String> vec)
      Recursively adds DICOM filenames and directory paths to a Vector.
      Parameters:
      name - The name of either file or directory
      vec - Vector that holds all files to be processed
    • runConversion

      private void runConversion(String fileName)
      Opens a dicom image, checks to see if it is 3d, adds margins if the image dimensions are not multiples of 4, and saves the image as an AVI with MP42 compression**note - the directory structure is intact with the only difference being that the name of the top level directory now has "_AVI" appended.
      Parameters:
      fileName - name of file to convert