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
Recursively traverses a directory and its subfolders, converting all 3D DICOM files to AVI with MP42 Compression.
- Version:
- 1.0
- Author:
- Ben Link
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDOCUMENT ME!private StringDirectory to recursively operate in.private FileIODOCUMENT ME!private StringOutput path to build new tree.private floatDOCUMENT ME!Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmDICOMtoAVI(String dir, String outputDir, int compression) Default Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddFilesToVector(String name, Vector<String> vec) Recursively adds DICOM filenames and directory paths to a Vector.voidDOCUMENT ME!private voidrunConversion(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.voidsetQuality(float q) DOCUMENT ME!Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
compression
private int compressionDOCUMENT ME! -
dirPath
Directory to recursively operate in. -
fileIO
DOCUMENT ME! -
outputPath
Output path to build new tree. -
quality
private float qualityDOCUMENT ME!
-
-
Constructor Details
-
AlgorithmDICOMtoAVI
Default Constructor.- Parameters:
dir- full pathname of directory to traverseoutputDir- DOCUMENT ME!compression- DOCUMENT ME!
-
-
Method Details
-
runAlgorithm
public void runAlgorithm()DOCUMENT ME!- Specified by:
runAlgorithmin classAlgorithmBase
-
setQuality
public void setQuality(float q) DOCUMENT ME!- Parameters:
q- DOCUMENT ME!
-
addFilesToVector
Recursively adds DICOM filenames and directory paths to a Vector.- Parameters:
name- The name of either file or directoryvec- Vector that holds all files to be processed
-
runConversion
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
-