Package gov.nih.mipav.model.file
Class FileTrackVis
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileTrackVis
Reads a .trk track file as a MIPAV mask image.
- Author:
- justinsenseney
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FileInfoTrackVisFileinfo for imageprivate ModelImageCreated imageprivate shortNumber of properties associated with each trackprivate shortNumber of scalars for each datapointprivate intIf 0 then # of tracks is unknownprivate TransMatrixTransformation matrix for imageFields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReads TrackVis header, first 1000 bytes of TRK file.Reads TrackVis series of tracks and creates masks from them, based on stored fileInfo.voidsetFileInfo(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 Details
-
fileInfo
Fileinfo for image -
nScalars
private short nScalarsNumber of scalars for each datapoint -
nProperties
private short nPropertiesNumber of properties associated with each track -
numTracks
private int numTracksIf 0 then # of tracks is unknown -
image
Created image -
trans
Transformation matrix for image
-
-
Constructor Details
-
FileTrackVis
- Throws:
IOException
-
-
Method Details
-
readHeader
Reads TrackVis header, first 1000 bytes of TRK file.- Throws:
IOException- if there is an error reading the file
-
readImage
Reads TrackVis series of tracks and creates masks from them, based on stored fileInfo. -
getFileInfo
-
setFileInfo
-