Package gov.nih.mipav.model.file
Class FileGESigna4X
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileGESigna4X
Fixed format header
Image data is not compressed
Image data fixed offset 14336 bytes
Data General host
The image files are of fixed layout, described here as a series of 256 by 16
bit word blocks (512 bytes), blocks numbered from 0. The headers start at
the following block offsets:
block 0 - length 4 blocks - System configuration
block 4 - length 2 blocks - Site customization
block 6 - length 2 blocks - Study header
block 8 - length 2 blocks - Series header
block 10 - length 2 blocks - Image header
block 12 - length 4 blocks - Raw database header
block 16 - length 10 blocks - Pulse sequence description
block 26 - length 2 blocks - Pixel map (? not ever used)
block 28 - length 256 blocks - Image data
The header is a fixed length of 14336 bytes, after which the uncompressed
image data starts.
16 bit big endian shorts are used. Ascii strings are FORTRAN style
specifications with length in bytes. 4 byte floats are used.
Spacing between slices was seen to vary so resolution[2] cannot be obtained
by checking the difference between slice spacing. The field called pixel
size actually gives 5 * resolution[2].
resolution[0] and resolution[1] can in theory be calculated in 3 different
ways with 3 slightly different results. (fov/256)*kludge factor 2,
(difference between corners/255) * kludge factor 2, or
using the thickness field equals about 10 * resolution[0] = 10 * resolution[1].
Use fov/256 multiplied by a kludge factor of 2 to obtain the right answer.
On one run SWAP_PF said Operator selects to swap phase and frequency and PF_SWAPPED
said Phase and frequency not swapped, a seeming contradiction. The field strength
in the series header was read as -99 gauss. The 6 values for SAT pulse location
relative to landmark were all 9999 millimeters. So there are problems.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatprivate intprivate intprivate floatprivate floatprivate shortprivate shortprivate shortprivate floatprivate shortprivate shortprivate byte[]DOCUMENT ME!private shortprivate shortprivate shortprivate shortprivate Stringprivate Stringprivate shortprivate shortprivate shortprivate shortprivate shortprivate Stringprivate floatprivate Stringprivate shortprivate shortprivate shortprivate shortprivate Stringprivate shortprivate intprivate booleanprivate floatprivate floatprivate floatprivate floatprivate shortprivate floatprivate shortprivate shortprivate StringDOCUMENT ME!private shortprivate FileDOCUMENT ME!private FileInfoGESigna4XDOCUMENT ME!private StringDOCUMENT ME!private shortprivate shortprivate shortprivate shortprivate Stringprivate shortprivate shortprivate shortprivate Stringprivate floatprivate Stringprivate Stringprivate Stringprivate intprivate shortprivate Stringprivate shortprivate shortprivate Stringprivate Stringprivate floatprivate shortprivate shortprivate Stringprivate shortprivate Stringprivate intprivate shortprivate shortprivate floatprivate shortprivate Stringprivate shortprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate intprivate Stringprivate shortprivate Stringprivate shortprivate shortprivate Stringprivate int[]private shortprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate shortprivate intprivate shortprivate floatprivate shortprivate floatprivate shortprivate shortprivate Stringprivate floatprivate Stringprivate shortprivate shortprivate shortprivate shortprivate Stringprivate Stringprivate floatprivate shortprivate Stringprivate shortprivate shortprivate shortprivate Stringprivate shortprivate shortprivate Stringprivate shortprivate shortprivate shortprivate shortprivate shortprivate Stringprivate Stringprivate floatprivate shortprivate intprivate intprivate intprivate intprivate Stringprivate Stringprivate shortprivate floatprivate floatprivate floatprivate floatprivate shortprivate shortprivate shortprivate Stringprivate shortprivate shortprivate shortprivate shortprivate shortprivate shortprivate shortprivate shortprivate shortprivate shortprivate intprivate shortprivate shortprivate Stringprivate floatprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate shortprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate intprivate Stringprivate shortprivate Stringprivate shortprivate floatprivate shortprivate shortprivate shortprivate floatprivate float[]private floatprivate floatprivate floatprivate Stringprivate Stringprivate shortprivate Stringprivate Stringprivate Stringprivate shortprivate Stringprivate shortprivate shortprivate Stringprivate shortprivate shortprivate Stringprivate Stringprivate Stringprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate shortprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate floatprivate shortprivate shortprivate shortprivate shortprivate floatprivate Stringprivate floatprivate shortFields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for cleanup.DOCUMENT ME!intDOCUMENT ME!floatintDOCUMENT ME!floatfloatfloatfloatfloatfloatfloatfloatfloatintgetWidth()DOCUMENT ME!booleanLooks for the image header ID "IMAGE HEADER" and number of image header blocks (usually 2 in units of 512 bytes )in GE Signa 4.X file in the File header.private voidreadBuffer(float[] buffer) Reads a slice of data at a time and stores the results in the buffer.voidreadImage(float[] buffer) reads the Signa 4X file header and data.intDOCUMENT ME!voidsetFileName(String fName) Accessor that sets the file name and allocates new FileInfo, File and RandomAccess file objects.voidwriteImage(ModelImage image, FileWriteOptions options) Methods inherited from class gov.nih.mipav.model.file.FileBase
addProgressChangeListener, bytesToDouble, bytesToFloat, bytesToInt, bytesToShort, doubleToBytes, 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
-
systemID
-
systemConfigHospitalName
-
studyHeaderID
-
studyHeaderRevisionNumber
-
studyHeaderBlocks
private short studyHeaderBlocks -
MRIProcessName
-
studyTaskID
private short studyTaskID -
rawDataStudyNumber
-
studyNumber
-
rawDataSystemID
-
systemGenerationID
-
studyDate
-
studyTime
-
patientName
-
patientID
-
patientAge
-
patientSex
-
patientWeight
private int patientWeight -
referringPhysician
-
diognostician
-
operator
-
studyDescription
-
history
-
hospitalName
-
patientStatus
private short patientStatus -
requestedNumber
-
seriesHeaderID
-
seriesHeaderRevisionNumber
-
seriesRevisionSubnumber
private int seriesRevisionSubnumber -
seriesHeaderBlocks
private short seriesHeaderBlocks -
seriesProcessName
-
seriesTaskID
private short seriesTaskID -
originalSeriesNumber
-
seriesNumber
-
seriesRawDataSystemID
-
seriesSystemGenerationID
-
seriesDate
-
seriesTime
-
seriesDescription
-
seriesType
private short seriesType -
coilType
private short coilType -
coilName
-
contrastDescription
-
planeType
private short planeType -
planeName
-
imageMode
private short imageMode -
fieldStrength
private short fieldStrength -
pulseSequence
private short pulseSequence -
pulseSequenceSubtype
private short pulseSequenceSubtype -
fieldOfView
private float fieldOfView -
rlCenter
private float rlCenter -
apCenter
private float apCenter -
siCenter
private float siCenter -
orientation
private short orientation -
position
private short position -
longitudinalAnatomicalReference
-
verticalAnatomicalReference
-
verticalLandmark
private float verticalLandmark -
horizontalLandmark
private float horizontalLandmark -
tableLocation
private float tableLocation -
scanMatrixX
private short scanMatrixX -
scanMatrixY
private short scanMatrixY -
imageMatrix
private short imageMatrix -
imagesAllocated
private short imagesAllocated -
gatingType
private short gatingType -
pulseSequenceMode
private short pulseSequenceMode -
gatingTypeString
-
seriesPSDName
-
landmarkCounter
private int landmarkCounter -
scanProtocolName
-
surfaceCoilType
private short surfaceCoilType -
suppressionTechnique
private short suppressionTechnique -
satSelections
private short satSelections -
satSelectionsString
-
surfaceCoilIntensityCorrection
private short surfaceCoilIntensityCorrection -
satXLoc1
private short satXLoc1 -
satXLoc2
private short satXLoc2 -
satYLoc1
private short satYLoc1 -
satYLoc2
private short satYLoc2 -
satZLoc1
private short satZLoc1 -
satZLoc2
private short satZLoc2 -
satXThick
private short satXThick -
satYThick
private short satYThick -
satZThick
private short satZThick -
vasMode
private short vasMode -
phaseContrastFlowAxis
private short phaseContrastFlowAxis -
gatingType2
private short gatingType2 -
imageHeaderID
-
imageHeaderRevisionNumber
-
imageRevisionSubnumber
private int imageRevisionSubnumber -
imageHeaderBlocks
private short imageHeaderBlocks -
imageHeaderCreatorProcess
-
imageHeaderCreatorTask
private short imageHeaderCreatorTask -
imageCreationDate
-
imageCreationTime
-
imageNumber
-
series
-
imageRawDataSystemID
-
imageSystemGenerationID
-
startX
private float startX -
endX
private float endX -
startY
private float startY -
endY
private float endY -
startZ
private float startZ -
endZ
private float endZ -
imageLocation
private float imageLocation -
tablePosition
private float tablePosition -
thickness
private float thickness -
imageSpacing
private float imageSpacing -
round
private short round -
tr
private float tr -
ts
private float ts -
te
private float te -
ti
private float ti -
numberOfEchos
private short numberOfEchos -
echoNumber
private short echoNumber -
sliceQuantity
private short sliceQuantity -
averagesNumber
private short averagesNumber -
researchMode
private short researchMode -
psdFileName
-
psdDay
private short psdDay -
psdMonth
private short psdMonth -
psdYear
private short psdYear -
psdHour
private short psdHour -
psdMinute
private short psdMinute -
psdSeconds
private short psdSeconds -
graphicallyPrescribed
private short graphicallyPrescribed -
prescribedSeriesNumbers
-
prescribedImageNumbers
-
imageShape
private short imageShape -
pixelSize
private float pixelSize -
defaultWindow
private short defaultWindow -
defaultLevel
private short defaultLevel -
fileBlocks
private short fileBlocks -
excitationsNumber
private float excitationsNumber -
peakSAR
private float peakSAR -
averageSAR
private float averageSAR -
SARMonitored
private short SARMonitored -
contiguousSlices
private short contiguousSlices -
cardiacHeartRate
private short cardiacHeartRate -
totalPostTriggerDelayTime
private float totalPostTriggerDelayTime -
arrythmiaRejectionRatio
private short arrythmiaRejectionRatio -
cardiacRepTime
private short cardiacRepTime -
imagesPerCardiacCycle
private short imagesPerCardiacCycle -
scanARRs
private int scanARRs -
transmitAttenuatorSetting
private short transmitAttenuatorSetting -
receiveAttenuatorSetting
private short receiveAttenuatorSetting -
imageFieldStrength
private int imageFieldStrength -
imageOffset
private short imageOffset -
interImageDelay
private float interImageDelay -
psdName
-
flipAngle
private short flipAngle -
surfaceCoilsCorrectionType
-
scSer
-
scIma
-
extremityCoil
private short extremityCoil -
pSeries2
-
pImage2
-
rCenter
private float rCenter -
aCenter
private float aCenter -
sCenter
private float sCenter -
rNormal
private float rNormal -
aNormal
private float aNormal -
sNormal
private float sNormal -
imgTLHC_R
private float imgTLHC_R -
imgTLHC_A
private float imgTLHC_A -
imgTLHC_S
private float imgTLHC_S -
imgTRHC_R
private float imgTRHC_R -
imgTRHC_A
private float imgTRHC_A -
imgTRHC_S
private float imgTRHC_S -
imgBLHC_R
private float imgBLHC_R -
imgBLHC_A
private float imgBLHC_A -
imgBLHC_S
private float imgBLHC_S -
imageHeaderDisclaimer
private short imageHeaderDisclaimer -
minimumDelay
private short minimumDelay -
cPhase
private short cPhase -
TE2
private float TE2 -
swapPF
private short swapPF -
pauseInterval
private short pauseInterval -
pauseTime
private float pauseTime -
userBitmap
private short userBitmap -
user0
private float user0 -
user1
private float user1 -
user2
private float user2 -
user3
private float user3 -
user4
private float user4 -
user5
private float user5 -
user6
private float user6 -
user7
private float user7 -
user8
private float user8 -
user9
private float user9 -
obliquePlane
private short obliquePlane -
contrastUsed
private short contrastUsed -
contrastAgent
-
contrastAmount
private float contrastAmount -
fileFormat
private short fileFormat -
autoCenterFrequency
private short autoCenterFrequency -
actualTransmitFrequency
private int actualTransmitFrequency -
actualReceiveFrequency
private int actualReceiveFrequency -
recommendedTransmitFrequency
private int recommendedTransmitFrequency -
recommendedReceiveFrequency
private int recommendedReceiveFrequency -
recommendedTransmitAttenuation
private int recommendedTransmitAttenuation -
recommendedReceiveAttenuation
private int recommendedReceiveAttenuation -
histogramPresent
private short histogramPresent -
pfSwapped
private short pfSwapped -
R1
private short R1 -
R2
private short R2 -
variableBandwidth
private short variableBandwidth -
prescanReceiveAttenuation1
private short prescanReceiveAttenuation1 -
prescanReceiveAttenuation2
private short prescanReceiveAttenuation2 -
autoManualPrescan
private short autoManualPrescan -
changedValuesBitmap
private short changedValuesBitmap -
changedValuesString
-
imageType
private short imageType -
collapseImage
private short collapseImage -
sliceThicknessDisclaimer
private short sliceThicknessDisclaimer -
PCVelocityEncoding
private short PCVelocityEncoding -
projectionAngle
private float projectionAngle -
concatenatedSATSelection
private short concatenatedSATSelection -
fractionalEffectiveEcho
private short fractionalEffectiveEcho -
echoTrainLength
private int echoTrainLength -
sliceMultiplier
private short sliceMultiplier -
cardiacPhaseNumber
private short cardiacPhaseNumber -
scanAcquisitionNumber
private short scanAcquisitionNumber -
vascularImagingFlags
private short vascularImagingFlags -
vencScalingFactor
private float vencScalingFactor -
byteBuffer
private byte[] byteBufferDOCUMENT ME! -
fileDir
DOCUMENT ME! -
fileHeader
DOCUMENT ME! -
fileInfo
DOCUMENT ME! -
fileName
DOCUMENT ME! -
orient
private int[] orient -
start
private float[] start -
endianess
private boolean endianess -
width
private short width -
height
private short height -
compression
private short compression -
bitsPerPixel
private short bitsPerPixel -
resX
private float resX -
resY
private float resY
-
-
Constructor Details
-
FileGESigna4X
reader/writer constructor.- Parameters:
fileName- file namefileDir- file directory- Throws:
IOException- if there is an error making the file
-
-
Method Details
-
finalize
public void finalize()Prepares this class for cleanup. Calls thefinalizemethod for existing elements, closes any open files and sets other elements tonull. -
getFileInfo
DOCUMENT ME!- Returns:
- FileInfoGESigna4X fileInfo
-
getImageNumber
public int getImageNumber()DOCUMENT ME!- Returns:
- int image number
-
getPatientName
- Returns:
-
getWidth
public int getWidth()DOCUMENT ME!- Returns:
- int width
-
getHeight
public int getHeight()DOCUMENT ME!- Returns:
- int height
-
getImageLocation
public float getImageLocation()- Returns:
-
getImgTLHC_R
public float getImgTLHC_R()- Returns:
-
getImgTLHC_A
public float getImgTLHC_A()- Returns:
-
getImgTLHC_S
public float getImgTLHC_S()- Returns:
-
getImgTRHC_R
public float getImgTRHC_R()- Returns:
-
getImgTRHC_A
public float getImgTRHC_A()- Returns:
-
getImgTRHC_S
public float getImgTRHC_S()- Returns:
-
getImgBLHC_R
public float getImgBLHC_R()- Returns:
-
getImgBLHC_A
public float getImgBLHC_A()- Returns:
-
getImgBLHC_S
public float getImgBLHC_S()- Returns:
-
isGESigna4X
Looks for the image header ID "IMAGE HEADER" and number of image header blocks (usually 2 in units of 512 bytes )in GE Signa 4.X file in the File header. If present, the image is GE SIGNA 4.X format.- Returns:
- boolean true if the image header ID and 2 image header blocks was found in the image header.
- Throws:
IOException- Indicates error reading the file
-
readImage
reads the Signa 4X file header and data.- Parameters:
buffer- DOCUMENT ME!- Throws:
IOException- if there is an error reading the file
-
setFileName
Accessor that sets the file name and allocates new FileInfo, File and RandomAccess file objects.- Parameters:
fName- File name.- Throws:
IOException- if there is an error constructing the files.
-
readBuffer
Reads a slice of data at a time and stores the results in the buffer.- Parameters:
buffer- buffer where the info is stored- Throws:
IOException- DOCUMENT ME!
-
readImageFileData
public int readImageFileData()DOCUMENT ME!- Returns:
- int size of image file data
-
writeImage
- Throws:
IOException
-