Package gov.nih.mipav.model.file
Class FileTrackVis
- java.lang.Object
-
- gov.nih.mipav.model.file.FileBase
-
- gov.nih.mipav.model.file.FileTrackVis
-
public class FileTrackVis extends FileBase
Reads a .trk track file as a MIPAV mask image.- Author:
- justinsenseney
-
-
Field Summary
Fields Modifier and Type Field Description private FileInfoTrackVis
fileInfo
Fileinfo for imageprivate ModelImage
image
Created imageprivate short
nProperties
Number of properties associated with each trackprivate short
nScalars
Number of scalars for each datapointprivate int
numTracks
If 0 then # of tracks is unknownprivate TransMatrix
trans
Transformation matrix for image-
Fields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE
-
-
Constructor Summary
Constructors Constructor Description FileTrackVis(java.lang.String fileName, java.lang.String fileDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileInfoTrackVis
getFileInfo()
boolean
readHeader()
Reads TrackVis header, first 1000 bytes of TRK file.ModelImage
readImage()
Reads TrackVis series of tracks and creates masks from them, based on stored fileInfo.void
setFileInfo(FileInfoTrackVis fileInfo)
-
Methods inherited from class gov.nih.mipav.model.file.FileBase
addProgressChangeListener, bytesToDouble, bytesToFloat, bytesToInt, bytesToShort, doubleToBytes, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, floatToBytes, getBufferDouble, getBufferFloat, getBufferInt, getBufferLong, getBufferShort, getBufferUShort, getDataType, getDouble, getFloat, getInt, getLong, getProgressChangeListeners, getRaFile, getSignedShort, getString, getUInt, getUnsignedByte, getUnsignedShort, intToBytes, isBigEndian, isProgressBarVisible, linkProgress, longToBytes, readDouble, readFloat, readInt, readLong, readShort, readString, readUnsignedShort, removeProgressChangeListener, setBigEndian, setBufferFloat, setBufferInt, setBufferLong, setBufferShort, setBufferString, setDataType, setEndianess, shortToBytes, writeBytes, writeDouble, writeFloat, writeInt, writeLong, writeShort
-
-
-
-
Field Detail
-
fileInfo
private FileInfoTrackVis fileInfo
Fileinfo for image
-
nScalars
private short nScalars
Number of scalars for each datapoint
-
nProperties
private short nProperties
Number of properties associated with each track
-
numTracks
private int numTracks
If 0 then # of tracks is unknown
-
image
private ModelImage image
Created image
-
trans
private TransMatrix trans
Transformation matrix for image
-
-
Method Detail
-
readHeader
public boolean readHeader() throws java.io.IOException
Reads TrackVis header, first 1000 bytes of TRK file.- Throws:
java.io.IOException
- if there is an error reading the file
-
readImage
public ModelImage readImage()
Reads TrackVis series of tracks and creates masks from them, based on stored fileInfo.
-
getFileInfo
public FileInfoTrackVis getFileInfo()
-
setFileInfo
public void setFileInfo(FileInfoTrackVis fileInfo)
-
-