Class FileGESigna4X

java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileGESigna4X

public class FileGESigna4X extends FileBase
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 Details

    • systemID

      private String systemID
    • systemConfigHospitalName

      private String systemConfigHospitalName
    • studyHeaderID

      private String studyHeaderID
    • studyHeaderRevisionNumber

      private String studyHeaderRevisionNumber
    • studyHeaderBlocks

      private short studyHeaderBlocks
    • MRIProcessName

      private String MRIProcessName
    • studyTaskID

      private short studyTaskID
    • rawDataStudyNumber

      private String rawDataStudyNumber
    • studyNumber

      private String studyNumber
    • rawDataSystemID

      private String rawDataSystemID
    • systemGenerationID

      private String systemGenerationID
    • studyDate

      private String studyDate
    • studyTime

      private String studyTime
    • patientName

      private String patientName
    • patientID

      private String patientID
    • patientAge

      private String patientAge
    • patientSex

      private String patientSex
    • patientWeight

      private int patientWeight
    • referringPhysician

      private String referringPhysician
    • diognostician

      private String diognostician
    • operator

      private String operator
    • studyDescription

      private String studyDescription
    • history

      private String history
    • hospitalName

      private String hospitalName
    • patientStatus

      private short patientStatus
    • requestedNumber

      private String requestedNumber
    • seriesHeaderID

      private String seriesHeaderID
    • seriesHeaderRevisionNumber

      private String seriesHeaderRevisionNumber
    • seriesRevisionSubnumber

      private int seriesRevisionSubnumber
    • seriesHeaderBlocks

      private short seriesHeaderBlocks
    • seriesProcessName

      private String seriesProcessName
    • seriesTaskID

      private short seriesTaskID
    • originalSeriesNumber

      private String originalSeriesNumber
    • seriesNumber

      private String seriesNumber
    • seriesRawDataSystemID

      private String seriesRawDataSystemID
    • seriesSystemGenerationID

      private String seriesSystemGenerationID
    • seriesDate

      private String seriesDate
    • seriesTime

      private String seriesTime
    • seriesDescription

      private String seriesDescription
    • seriesType

      private short seriesType
    • coilType

      private short coilType
    • coilName

      private String coilName
    • contrastDescription

      private String contrastDescription
    • planeType

      private short planeType
    • planeName

      private String 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

      private String longitudinalAnatomicalReference
    • verticalAnatomicalReference

      private String 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

      private String gatingTypeString
    • seriesPSDName

      private String seriesPSDName
    • landmarkCounter

      private int landmarkCounter
    • scanProtocolName

      private String scanProtocolName
    • surfaceCoilType

      private short surfaceCoilType
    • suppressionTechnique

      private short suppressionTechnique
    • satSelections

      private short satSelections
    • satSelectionsString

      private String 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

      private String imageHeaderID
    • imageHeaderRevisionNumber

      private String imageHeaderRevisionNumber
    • imageRevisionSubnumber

      private int imageRevisionSubnumber
    • imageHeaderBlocks

      private short imageHeaderBlocks
    • imageHeaderCreatorProcess

      private String imageHeaderCreatorProcess
    • imageHeaderCreatorTask

      private short imageHeaderCreatorTask
    • imageCreationDate

      private String imageCreationDate
    • imageCreationTime

      private String imageCreationTime
    • imageNumber

      private String imageNumber
    • series

      private String series
    • imageRawDataSystemID

      private String imageRawDataSystemID
    • imageSystemGenerationID

      private String 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

      private String 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

      private String prescribedSeriesNumbers
    • prescribedImageNumbers

      private String 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

      private String psdName
    • flipAngle

      private short flipAngle
    • surfaceCoilsCorrectionType

      private String surfaceCoilsCorrectionType
    • scSer

      private String scSer
    • scIma

      private String scIma
    • extremityCoil

      private short extremityCoil
    • pSeries2

      private String pSeries2
    • pImage2

      private String 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

      private String 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

      private String 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[] byteBuffer
      DOCUMENT ME!
    • fileDir

      private String fileDir
      DOCUMENT ME!
    • fileHeader

      private File fileHeader
      DOCUMENT ME!
    • fileInfo

      private FileInfoGESigna4X fileInfo
      DOCUMENT ME!
    • fileName

      private String 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

      public FileGESigna4X(String fileName, String fileDir) throws IOException
      reader/writer constructor.
      Parameters:
      fileName - file name
      fileDir - file directory
      Throws:
      IOException - if there is an error making the file
  • Method Details

    • finalize

      public void finalize()
      Prepares this class for cleanup. Calls the finalize method for existing elements, closes any open files and sets other elements to null.
      Overrides:
      finalize in class FileBase
    • getFileInfo

      public FileInfoGESigna4X getFileInfo()
      DOCUMENT ME!
      Returns:
      FileInfoGESigna4X fileInfo
    • getImageNumber

      public int getImageNumber()
      DOCUMENT ME!
      Returns:
      int image number
    • getPatientName

      public String 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

      public boolean isGESigna4X() throws IOException
      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

      public void readImage(float[] buffer) throws IOException
      reads the Signa 4X file header and data.
      Parameters:
      buffer - DOCUMENT ME!
      Throws:
      IOException - if there is an error reading the file
    • setFileName

      public void setFileName(String fName) throws IOException
      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

      private void readBuffer(float[] buffer) throws IOException
      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

      public void writeImage(ModelImage image, FileWriteOptions options) throws IOException
      Throws:
      IOException