Class AlgorithmDTICreateListFile
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.DiffusionTensorImaging.AlgorithmDTICreateListFile
-
- All Implemented Interfaces:
AlgorithmInterface
,java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmDTICreateListFile extends AlgorithmBase implements AlgorithmInterface
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
AlgorithmDTICreateListFile.InstanceNumberComparator
This inner class is used to sort the list by instance numberprivate class
AlgorithmDTICreateListFile.InstanceNumberVolComparator
This inner class is used to sort the list by instance number and vol. the vol is determined by the filename
-
Field Summary
Fields Modifier and Type Field Description private int
avgVolIndex
Philips puts in one volume as the average of all the DWIs.private java.lang.String
bmatrixFileName
B Matrix file nameprivate java.lang.String
bmtxtFilePath
This is the full path to the b matrix fileprivate java.util.ArrayList<java.lang.Float>
bValuesArrayList
this is an array of b-values that for each volumeprivate float
coarseRate
registration option parametersprivate float
coarseRateX
registration option parametersprivate float
coarseRateY
registration option parametersprivate float
coarseRateZ
registration option parametersprivate int
cost
registration option parametersprivate java.lang.String
dicomB0VolumePath
path to dicom B0 for registration purposesprivate java.lang.String[]
dicomInfo
Array that holds the dicom tag info*private float[][]
direction
this is the gradient matrix that is populated when reading the gradient fileprivate int
DOF
registration option parametersprivate boolean
doGraph
registration option parametersprivate boolean
doMultiThread
registration option parametersprivate boolean
doSubsample
registration option parametersprivate javax.swing.JTextField
dwiPathTextField
handle to dwi data textfield of main dialogprivate boolean
fastMode
registration option parametersprivate FileInfoPARREC
fileInfoPR
file info Par/Recprivate FileIO
fileIO
file IOprivate FilePARREC
fileParRec
FileParRec handleprivate float
fineRate
registration option parametersprivate float
fineRateX
registration option parametersprivate float
fineRateY
registration option parametersprivate float
fineRateZ
registration option parametersprivate FileInfoDicom
firstFileInfoDicom
first fileinfo dicom...used for list file infoprivate int
geSoftwareVersion
int telling software version if datset is GEprivate java.lang.String
gradientFilePath
This is the full path to the gradient fileprivate java.lang.String
horizontalFOVString
horizontal FOVprivate ModelImage
image4D
ModelImage of 4D par/rec datasetprivate ViewImageFileFilter
imageFilter
This is the image filter needed to select the correct dicom imagesprivate java.lang.String
imageOrientationString
image orientationprivate java.lang.String
imageSlicesDirPath
path for imageSlicesDirprivate int
interp
registration option parametersprivate int
interp2
registration option parametersprivate boolean
isDICOM
boolean indicating if we are dealing with dicom or par/recprivate boolean
isEDTI
boolean telling if dataset is eDTIprivate boolean
isGE
boolean telling if datset is GEprivate boolean
isInterleaved
boolean if dataset is interelavedprivate boolean
isOldVersion
boolean identifying if par/rec datset is older than version 4.1private boolean
isProcDirCreated
boolean if proc dir was createdprivate boolean
isSiemens
boolean telling if datset is SIEMENSprivate java.lang.String
listFileName
List file nameprivate ModelImage
matchImage
model imagesprivate int
maxIterations
registration option parametersprivate boolean
maxOfMinResol
registration option parametersprivate int
nim
this is the number of gradient quantities that is obtained by reading first line of gradient fileprivate int
nimCounter
this counter is used for version 4 of Par/Rec...nim is calculated from gradient fileprivate java.lang.String
nimString
t dimprivate int
numMinima
registration option parametersprivate int
numSlicesPerVolume
this is the number of image slices per volumeprivate java.lang.String
numSlicesString
z dimprivate java.util.ArrayList<java.lang.String[]>
oldVersionGradientsAL
arraylist of gradients for version 4 of Par/Recprivate java.lang.String
originalColumnsString
x dimprivate java.lang.String
originalRowsString
y dimprivate javax.swing.JTextArea
outputTextArea
TextArea of main dialog for text outputprivate java.lang.String
pathFileName
Path File nameprivate boolean
performRegistration
boolean for performing registrationprivate java.lang.String
phaseEncodingString
phase encoding...hard coded to verticalprivate java.lang.String
prFileDir
par rec file dirprivate java.lang.String
prFileName
par rec file nameprivate java.lang.String
rawImageFormatString
raw image format...hardcoded to float since we will be outputting par/rec slices in float formatprivate ModelImage
refImage
model imagesprivate AlgorithmRegOAR3D
reg3
handle to AlgorithmRegOAR3Dprivate AlgorithmRegOAR35D
reg35
handle to AlgorithmRegOAR35Dprivate java.lang.String
registeredDicomB0VolumePathParentFolder
registered B0 parent folderprivate java.lang.String
registeredStudyName
study name for registered data setprivate int
registerTo
registration option parametersprivate java.lang.String
relativeImageSlicesDirPath
relative path for slices dir for outputting to path fileprivate ModelImage
resultImage
model imagesprivate float
rotateBegin
registration option parametersprivate float
rotateBeginX
registration option parametersprivate float
rotateBeginY
registration option parametersprivate float
rotateBeginZ
registration option parametersprivate float
rotateEnd
registration option parametersprivate float
rotateEndX
registration option parametersprivate float
rotateEndY
registration option parametersprivate float
rotateEndZ
registration option parametersprivate java.util.TreeMap<java.lang.Integer,java.util.TreeSet<java.lang.String[]>>
seriesFileInfoTreeMap
This is an ordered map of series number and seriesFileInfoTreeSetprivate java.util.TreeSet<java.lang.String[]>
seriesFileInfoTreeSet
This is an ordered list of files per series numberprivate java.lang.String
sliceGapString
slice gap Stringprivate java.lang.String
sliceThicknessString
sliec thicknessprivate java.lang.String
studyName
This is the dir name of the studyprivate java.lang.String
studyPath
This is the full path of the studyprivate boolean
success
flag indicating if method was successfulprivate int
tDim
tDim of 4d imageprivate int
totalImageSlices
total image slicesprivate int
totalNumVolumes
total num of volumes in studyprivate AlgorithmTransform
transform
handle to AlgorithmTransformprivate java.util.ArrayList<java.lang.String>
unsortedPathsArrayList
arraylist of unsorted path strings to image slicesprivate java.lang.String
verticalFOVString
vertical FOVprivate java.util.HashMap<java.lang.String,java.lang.String>
volParameters
vol parametersprivate int
xDim
xDIm of 4d imageprivate int
xdimA
parameter for AlgorithmTransformprivate float
xresA
parameter for AlgorithmTransformprivate int
yDim
yDim of 4d imageprivate int
ydimA
parameter for AlgorithmTransformprivate float
yresA
parameter for AlgorithmTransformprivate int
zDim
zDim of 4d imageprivate int
zdimA
parameter for AlgorithmTransformprivate float
zresA
parameter for AlgorithmTransform-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmDTICreateListFile(java.lang.String studyPath, java.lang.String studyName, java.lang.String dicomB0VolumePath, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean isInterleaved, boolean performRegsitration, int cost, int DOF, int interp, int interp2, float rotateBeginX, float rotateEndX, float coarseRateX, float fineRateX, float rotateBeginY, float rotateEndY, float coarseRateY, float fineRateY, float rotateBeginZ, float rotateEndZ, float coarseRateZ, float fineRateZ, boolean maxOfMinResol, boolean doSubsample, boolean doMultiThread, boolean fastMode, int bracketBound, int maxIterations, int numMinima, javax.swing.JTextField dwiPathTextField)
constructor for dicom if registration is to be done firstAlgorithmDTICreateListFile(java.lang.String fileName, java.lang.String fileDir, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean performRegsitration)
constructor for par/recAlgorithmDTICreateListFile(java.lang.String studyPath, java.lang.String studyName, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean isInterleaved, boolean performRegsitration)
constructor for dicomAlgorithmDTICreateListFile(java.lang.String fileName, java.lang.String fileDir, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean performRegsitration, int cost, int DOF, int interp, int interp2, int registerTo, float rotateBegin, float rotateEnd, float coarseRate, float fineRate, boolean doSubsample, boolean doMultiThread, boolean fastMode, int bracketBound, int maxIterations, int numMinima, javax.swing.JTextField dwiPathTextField)
constructor for par/rec if registration is to be done first
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
algorithmPerformed(AlgorithmBase algorithm)
Called after an algorithm this listener is registered to exits (maybe successfully, maybe not).boolean
copyBMatrixFile()
This method copies the optional b matrix file that user provided, and copies it to proc dir and renames it to the correct naming syntax.boolean
createBMatrixFileDICOM()
This method creates the b-matrix file.boolean
createBMatrixFileParRec()
This method creates the B-Matrix fileboolean
createListFileDICOM()
This method creates the list file.boolean
createListFileParRec()
This method creates the list file.boolean
createPathFileDICOM()
This method creates the path file.boolean
createPathFileForInterleavedDICOM()
This method creates the path file for interleaverd datasetsboolean
createPathFileParRec()
This method creates the path fileboolean
createProcDirAndImageSlicesDirParRec()
this method creates the proc dir in which the list file, path file, and b-matrix file go.boolean
createProcDirDICOM()
this method creates the proc dir in which the list file, path file, and b-matrix file go.boolean
createSubDirsInRegisteredDir(java.io.File dir)
boolean
deleteAllFiles(java.io.File dir)
void
finalize()
this method cleans up the proc dir if success is false and it sets the lists to null.boolean
obtainBValuesDICOM()
This method obtains the b-values for each volume from either the public tag or the private tag.boolean
obtainListFileDataParRec()
This method obtains list file data mostly from the 1st sliceboolean
parse(java.io.File file)
this method parses the study dir sort into lists using series number that is available in dicom tag. then based on the filename, get vol number (for example mipav_dicom_dti_series11_volume10005.dcm), and sort within lists using vol number and instance number that comes from dicom tag.boolean
performRegistrationDICOM()
regsitration of DICOM DWI datasetboolean
performRegistrationPARREC()
regsitration of PAR REC DWI datasetboolean
readGradientFileDICOM()
This method reads in the gradient file gradient file can be in 2 differetn ways....for eDTI, there will be a number on first line followed by correct number of gradients if it is DTI, there will be no number and just 7 linies of gradients....this needs to be duplicated as many times as there are series.boolean
readGradientFileParRec()
this method reads the gradient fileboolean
registerAndSaveVolumes(java.io.File dir)
void
runAlgorithm()
Actually runs the algorithm.void
runAlgorithmDICOM()
run algorithm for dicomvoid
runAlgorithmPARREC()
run algorithm for par/recboolean
setInitialInfo()
this method sets initial info about the study.boolean
writeImageSlicesParRec()
This method writes out the image slices as raw float-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, 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, windowOpened
-
Methods 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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
studyName
private java.lang.String studyName
This is the dir name of the study.*
-
studyPath
private java.lang.String studyPath
This is the full path of the study.*
-
prFileName
private java.lang.String prFileName
par rec file name
-
prFileDir
private java.lang.String prFileDir
par rec file dir
-
gradientFilePath
private java.lang.String gradientFilePath
This is the full path to the gradient file.*
-
bmtxtFilePath
private java.lang.String bmtxtFilePath
This is the full path to the b matrix file.*
-
isInterleaved
private boolean isInterleaved
boolean if dataset is interelaved
-
outputTextArea
private javax.swing.JTextArea outputTextArea
TextArea of main dialog for text output.*
-
dwiPathTextField
private javax.swing.JTextField dwiPathTextField
handle to dwi data textfield of main dialog
-
seriesFileInfoTreeMap
private java.util.TreeMap<java.lang.Integer,java.util.TreeSet<java.lang.String[]>> seriesFileInfoTreeMap
This is an ordered map of series number and seriesFileInfoTreeSet.*
-
seriesFileInfoTreeSet
private java.util.TreeSet<java.lang.String[]> seriesFileInfoTreeSet
This is an ordered list of files per series number.*
-
isDICOM
private boolean isDICOM
boolean indicating if we are dealing with dicom or par/rec
-
listFileName
private java.lang.String listFileName
List file name
-
bmatrixFileName
private java.lang.String bmatrixFileName
B Matrix file name
-
pathFileName
private java.lang.String pathFileName
Path File name
-
success
private boolean success
flag indicating if method was successful.*
-
totalImageSlices
private int totalImageSlices
total image slices.*
-
totalNumVolumes
private int totalNumVolumes
total num of volumes in study.*
-
isEDTI
private boolean isEDTI
boolean telling if dataset is eDTI.*
-
isGE
private boolean isGE
boolean telling if datset is GE.*
-
isSiemens
private boolean isSiemens
boolean telling if datset is SIEMENS.*
-
firstFileInfoDicom
private FileInfoDicom firstFileInfoDicom
first fileinfo dicom...used for list file info.*
-
geSoftwareVersion
private int geSoftwareVersion
int telling software version if datset is GE.*
-
imageFilter
private ViewImageFileFilter imageFilter
This is the image filter needed to select the correct dicom images.*
-
dicomInfo
private java.lang.String[] dicomInfo
Array that holds the dicom tag info*
-
isProcDirCreated
private boolean isProcDirCreated
boolean if proc dir was created.*
-
numSlicesPerVolume
private int numSlicesPerVolume
this is the number of image slices per volume.*
-
nim
private int nim
this is the number of gradient quantities that is obtained by reading first line of gradient file.*
-
direction
private float[][] direction
this is the gradient matrix that is populated when reading the gradient file.*
-
bValuesArrayList
private java.util.ArrayList<java.lang.Float> bValuesArrayList
this is an array of b-values that for each volume.*
-
fileParRec
private FilePARREC fileParRec
FileParRec handle
-
fileInfoPR
private FileInfoPARREC fileInfoPR
file info Par/Rec
-
image4D
private ModelImage image4D
ModelImage of 4D par/rec dataset
-
originalColumnsString
private java.lang.String originalColumnsString
x dim
-
originalRowsString
private java.lang.String originalRowsString
y dim
-
numSlicesString
private java.lang.String numSlicesString
z dim
-
nimString
private java.lang.String nimString
t dim
-
phaseEncodingString
private java.lang.String phaseEncodingString
phase encoding...hard coded to vertical
-
horizontalFOVString
private java.lang.String horizontalFOVString
horizontal FOV
-
verticalFOVString
private java.lang.String verticalFOVString
vertical FOV
-
sliceGapString
private java.lang.String sliceGapString
slice gap String
-
sliceThicknessString
private java.lang.String sliceThicknessString
sliec thickness
-
imageOrientationString
private java.lang.String imageOrientationString
image orientation
-
volParameters
private java.util.HashMap<java.lang.String,java.lang.String> volParameters
vol parameters
-
avgVolIndex
private int avgVolIndex
Philips puts in one volume as the average of all the DWIs. This volume will have a non-zero B value and 0 in the gradients Once we find this volume, exclude it.... this int represents which volume index to exclude
-
isOldVersion
private boolean isOldVersion
boolean identifying if par/rec datset is older than version 4.1
-
oldVersionGradientsAL
private java.util.ArrayList<java.lang.String[]> oldVersionGradientsAL
arraylist of gradients for version 4 of Par/Rec
-
nimCounter
private int nimCounter
this counter is used for version 4 of Par/Rec...nim is calculated from gradient file
-
imageSlicesDirPath
private java.lang.String imageSlicesDirPath
path for imageSlicesDir
-
relativeImageSlicesDirPath
private java.lang.String relativeImageSlicesDirPath
relative path for slices dir for outputting to path file
-
rawImageFormatString
private java.lang.String rawImageFormatString
raw image format...hardcoded to float since we will be outputting par/rec slices in float format
-
unsortedPathsArrayList
private java.util.ArrayList<java.lang.String> unsortedPathsArrayList
arraylist of unsorted path strings to image slices
-
xDim
private int xDim
xDIm of 4d image
-
yDim
private int yDim
yDim of 4d image
-
zDim
private int zDim
zDim of 4d image
-
tDim
private int tDim
tDim of 4d image
-
performRegistration
private boolean performRegistration
boolean for performing registration
-
reg35
private AlgorithmRegOAR35D reg35
handle to AlgorithmRegOAR35D
-
reg3
private AlgorithmRegOAR3D reg3
handle to AlgorithmRegOAR3D
-
cost
private int cost
registration option parameters
-
DOF
private int DOF
registration option parameters
-
interp
private int interp
registration option parameters
-
interp2
private int interp2
registration option parameters
-
registerTo
private int registerTo
registration option parameters
-
maxIterations
private int maxIterations
registration option parameters
-
numMinima
private int numMinima
registration option parameters
-
rotateBegin
private float rotateBegin
registration option parameters
-
rotateEnd
private float rotateEnd
registration option parameters
-
coarseRate
private float coarseRate
registration option parameters
-
fineRate
private float fineRate
registration option parameters
-
rotateBeginX
private float rotateBeginX
registration option parameters
-
rotateEndX
private float rotateEndX
registration option parameters
-
coarseRateX
private float coarseRateX
registration option parameters
-
fineRateX
private float fineRateX
registration option parameters
-
rotateBeginY
private float rotateBeginY
registration option parameters
-
rotateEndY
private float rotateEndY
registration option parameters
-
coarseRateY
private float coarseRateY
registration option parameters
-
fineRateY
private float fineRateY
registration option parameters
-
rotateBeginZ
private float rotateBeginZ
registration option parameters
-
rotateEndZ
private float rotateEndZ
registration option parameters
-
coarseRateZ
private float coarseRateZ
registration option parameters
-
fineRateZ
private float fineRateZ
registration option parameters
-
doGraph
private boolean doGraph
registration option parameters
-
doSubsample
private boolean doSubsample
registration option parameters
-
doMultiThread
private boolean doMultiThread
registration option parameters
-
fastMode
private boolean fastMode
registration option parameters
-
maxOfMinResol
private boolean maxOfMinResol
registration option parameters
-
dicomB0VolumePath
private java.lang.String dicomB0VolumePath
path to dicom B0 for registration purposes
-
refImage
private ModelImage refImage
model images
-
matchImage
private ModelImage matchImage
model images
-
resultImage
private ModelImage resultImage
model images
-
fileIO
private FileIO fileIO
file IO
-
registeredStudyName
private java.lang.String registeredStudyName
study name for registered data set
-
transform
private AlgorithmTransform transform
handle to AlgorithmTransform
-
xdimA
private int xdimA
parameter for AlgorithmTransform
-
ydimA
private int ydimA
parameter for AlgorithmTransform
-
zdimA
private int zdimA
parameter for AlgorithmTransform
-
xresA
private float xresA
parameter for AlgorithmTransform
-
yresA
private float yresA
parameter for AlgorithmTransform
-
zresA
private float zresA
parameter for AlgorithmTransform
-
registeredDicomB0VolumePathParentFolder
private java.lang.String registeredDicomB0VolumePathParentFolder
registered B0 parent folder
-
-
Constructor Detail
-
AlgorithmDTICreateListFile
public AlgorithmDTICreateListFile(java.lang.String studyPath, java.lang.String studyName, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean isInterleaved, boolean performRegsitration)
constructor for dicom- Parameters:
studyPath
-studyName
-gradientFilePath
-bmtxtFilePath
-outputTextArea
-
-
AlgorithmDTICreateListFile
public AlgorithmDTICreateListFile(java.lang.String studyPath, java.lang.String studyName, java.lang.String dicomB0VolumePath, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean isInterleaved, boolean performRegsitration, int cost, int DOF, int interp, int interp2, float rotateBeginX, float rotateEndX, float coarseRateX, float fineRateX, float rotateBeginY, float rotateEndY, float coarseRateY, float fineRateY, float rotateBeginZ, float rotateEndZ, float coarseRateZ, float fineRateZ, boolean maxOfMinResol, boolean doSubsample, boolean doMultiThread, boolean fastMode, int bracketBound, int maxIterations, int numMinima, javax.swing.JTextField dwiPathTextField)
constructor for dicom if registration is to be done first- Parameters:
studyPath
-studyName
-gradientFilePath
-bmtxtFilePath
-outputTextArea
-
-
AlgorithmDTICreateListFile
public AlgorithmDTICreateListFile(java.lang.String fileName, java.lang.String fileDir, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean performRegsitration)
constructor for par/rec
-
AlgorithmDTICreateListFile
public AlgorithmDTICreateListFile(java.lang.String fileName, java.lang.String fileDir, java.lang.String gradientFilePath, java.lang.String bmtxtFilePath, javax.swing.JTextArea outputTextArea, boolean performRegsitration, int cost, int DOF, int interp, int interp2, int registerTo, float rotateBegin, float rotateEnd, float coarseRate, float fineRate, boolean doSubsample, boolean doMultiThread, boolean fastMode, int bracketBound, int maxIterations, int numMinima, javax.swing.JTextField dwiPathTextField)
constructor for par/rec if registration is to be done first
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
performRegistrationPARREC
public boolean performRegistrationPARREC()
regsitration of PAR REC DWI dataset
-
performRegistrationDICOM
public boolean performRegistrationDICOM()
regsitration of DICOM DWI dataset
-
registerAndSaveVolumes
public boolean registerAndSaveVolumes(java.io.File dir)
-
createSubDirsInRegisteredDir
public boolean createSubDirsInRegisteredDir(java.io.File dir)
-
deleteAllFiles
public boolean deleteAllFiles(java.io.File dir)
-
runAlgorithmDICOM
public void runAlgorithmDICOM()
run algorithm for dicom
-
runAlgorithmPARREC
public void runAlgorithmPARREC()
run algorithm for par/rec
-
setInitialInfo
public boolean setInitialInfo()
this method sets initial info about the study.- Returns:
- boolean success
-
parse
public boolean parse(java.io.File file) throws java.io.IOException, java.lang.OutOfMemoryError
this method parses the study dir sort into lists using series number that is available in dicom tag. then based on the filename, get vol number (for example mipav_dicom_dti_series11_volume10005.dcm), and sort within lists using vol number and instance number that comes from dicom tag.- Parameters:
file
-- Returns:
- boolean success
- Throws:
java.io.IOException
java.lang.OutOfMemoryError
-
createProcDirDICOM
public boolean createProcDirDICOM()
this method creates the proc dir in which the list file, path file, and b-matrix file go.- Returns:
- boolean success
-
createPathFileForInterleavedDICOM
public boolean createPathFileForInterleavedDICOM()
This method creates the path file for interleaverd datasets- Returns:
- boolean success
-
createPathFileDICOM
public boolean createPathFileDICOM()
This method creates the path file.- Returns:
- boolean success
-
createListFileDICOM
public boolean createListFileDICOM()
This method creates the list file.- Returns:
- boolean success
-
readGradientFileDICOM
public boolean readGradientFileDICOM()
This method reads in the gradient file gradient file can be in 2 differetn ways....for eDTI, there will be a number on first line followed by correct number of gradients if it is DTI, there will be no number and just 7 linies of gradients....this needs to be duplicated as many times as there are series.- Returns:
- boolean success
-
obtainBValuesDICOM
public boolean obtainBValuesDICOM()
This method obtains the b-values for each volume from either the public tag or the private tag.- Returns:
- boolean success
-
createBMatrixFileDICOM
public boolean createBMatrixFileDICOM()
This method creates the b-matrix file.- Returns:
- boolean success
-
obtainListFileDataParRec
public boolean obtainListFileDataParRec()
This method obtains list file data mostly from the 1st slice- Returns:
-
readGradientFileParRec
public boolean readGradientFileParRec()
this method reads the gradient file- Returns:
-
createProcDirAndImageSlicesDirParRec
public boolean createProcDirAndImageSlicesDirParRec()
this method creates the proc dir in which the list file, path file, and b-matrix file go.- Returns:
- boolean success
-
createListFileParRec
public boolean createListFileParRec()
This method creates the list file.- Returns:
- boolean success
-
createBMatrixFileParRec
public boolean createBMatrixFileParRec()
This method creates the B-Matrix file- Returns:
-
writeImageSlicesParRec
public boolean writeImageSlicesParRec()
This method writes out the image slices as raw float- Returns:
-
createPathFileParRec
public boolean createPathFileParRec()
This method creates the path file- Returns:
-
finalize
public void finalize()
this method cleans up the proc dir if success is false and it sets the lists to null.- Overrides:
finalize
in classAlgorithmBase
-
copyBMatrixFile
public boolean copyBMatrixFile()
This method copies the optional b matrix file that user provided, and copies it to proc dir and renames it to the correct naming syntax.- Returns:
- boolean
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
Description copied from interface:AlgorithmInterface
Called after an algorithm this listener is registered to exits (maybe successfully, maybe not). If the algorithm is run in a separate thread, this call will be made within that thread. If not, this call will be made from that same, shared thread.- Specified by:
algorithmPerformed
in interfaceAlgorithmInterface
- Parameters:
algorithm
- the algorithm which has just completed
-
-