Package gov.nih.mipav.model.file
Class FileCheshireVOI
java.lang.Object
gov.nih.mipav.model.file.FileBase
gov.nih.mipav.model.file.FileCheshireVOI
Addresses and lengths are always contained in 4 bytes. The first 4 bytes plus 4 give the location of ascii text
saying UserWndLevels, overlays, or sticks if overlays are present. The same region of interest in the same slice may
be saved with exactly the same contour using 2 different bounding boxes. The first 90 bytes are header bytes.
Location 0x24 may give a location to the start of information for a given slice. The first 4 bytes of this slice
information will give the location of the start of information for another slice. This will continue until the first
4 bytes of a slice contains 0x28. 0x28 contains 0. If 0x24 does not point to the start of slice information, then it
contains 0x28. However, the code collecting slice information from 0x24 was commented out since it produced a contour
in slice 15 in 10080-2-dwi-bo-sw.oly that was not seen in Cheshire. With UserWndLevels 0x8C gives the start of a
slice of information and the first 4 bytes of the information slice give the start of another slice until finally 1
slice starts with 0. With overlays and sticks an information slice starts 24 bytes after overlays. This 1 information
slice was different from other information slices in that the first 8 bytes had the locations of 2 information slices
instead of just 4 bytes for 1 location like the other information slices. Also note that information slices may be
fragmentary - they may not contain all the information promised by length bytes. In these cases just ignore the
fragments of the information slices.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate VOI[]DOCUMENT ME!private PolygonDOCUMENT ME!private short[]DOCUMENT ME!private FileDOCUMENT ME!private StringDOCUMENT ME!private intDOCUMENT ME!private short[]DOCUMENT ME!private shortDOCUMENT ME!private ModelImageDOCUMENT ME!private short[]DOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private intDOCUMENT ME!private booleanDOCUMENT ME!static final intDOCUMENT ME!(package private) ViewJProgressBarDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!static final intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!static final intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!Fields inherited from class gov.nih.mipav.model.file.FileBase
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionFileCheshireVOI(String fileName, String fileDir, ModelImage image) FileCheshireVOI - VOI reader/writer constructor. -
Method Summary
Modifier and TypeMethodDescriptionVOI[]readVOI()readVOI - reads an Cheshire overlay file by reading the overlay information for each different VOI into a different bitmap.voidsetRegionMask(int xStart, int yStart, short objectValue) setRegionMask set the mask of all points in the 4 connected region with a gray scale value of objectValue.voidDOCUMENT ME!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
-
USERWNDLEVELS
public static final int USERWNDLEVELSDOCUMENT ME!- See Also:
-
OVERLAYS
public static final int OVERLAYSDOCUMENT ME!- See Also:
-
STICKS
public static final int STICKSDOCUMENT ME!- See Also:
-
progressBar
ViewJProgressBar progressBarDOCUMENT ME! -
addedVOI
DOCUMENT ME! -
contourPolygon
DOCUMENT ME! -
expImgBuffer
private short[] expImgBufferDOCUMENT ME! -
file
DOCUMENT ME! -
fileName
DOCUMENT ME! -
fileType
private int fileTypeDOCUMENT ME! -
grayScaleArray
private short[] grayScaleArrayDOCUMENT ME! -
grayScaleNumber
private short grayScaleNumberDOCUMENT ME! -
image
DOCUMENT ME! -
imgBuffer
private short[] imgBufferDOCUMENT ME! -
length
private int lengthDOCUMENT ME! -
mask
DOCUMENT ME! -
mask2
DOCUMENT ME! -
maskAll
DOCUMENT ME! -
maskE
DOCUMENT ME! -
maskN
DOCUMENT ME! -
maskS
DOCUMENT ME! -
maskW
DOCUMENT ME! -
neighbors
private int neighborsDOCUMENT ME! -
newGrayScale
private boolean newGrayScaleDOCUMENT ME! -
scanPos
private int scanPosDOCUMENT ME! -
sliceSize
private int sliceSizeDOCUMENT ME! -
smallPos
private int smallPosDOCUMENT ME! -
smallX
private int smallXDOCUMENT ME! -
smallY
private int smallYDOCUMENT ME! -
testPos
private int testPosDOCUMENT ME! -
totalSize
private int totalSizeDOCUMENT ME! -
xDim
private int xDimDOCUMENT ME! -
yDim
private int yDimDOCUMENT ME! -
zDim
private int zDimDOCUMENT ME! -
xDimE
private int xDimEDOCUMENT ME! -
xt
private int xtDOCUMENT ME! -
yt
private int ytDOCUMENT ME! -
it
private int itDOCUMENT ME! -
yDimE
private int yDimEDOCUMENT ME!
-
-
Constructor Details
-
FileCheshireVOI
FileCheshireVOI - VOI reader/writer constructor.- Parameters:
fileName- file namefileDir- file directoryimage- image model: needed during the read process to ensure the VOI "fits" in the image space.- Throws:
IOException- if there is an error making the files
-
-
Method Details
-
readVOI
readVOI - reads an Cheshire overlay file by reading the overlay information for each different VOI into a different bitmap.- Returns:
- DOCUMENT ME!
- Throws:
IOException- if there is an error reading the fileOutOfMemoryError- DOCUMENT ME!
-
setRegionMask
public void setRegionMask(int xStart, int yStart, short objectValue) setRegionMask set the mask of all points in the 4 connected region with a gray scale value of objectValue.- Parameters:
xStart- the x coordinate of the starting pointyStart- the y coordinate of the starting pointobjectValue- the gray scale value of the object
-
setRegionMaskAll
public void setRegionMaskAll()DOCUMENT ME!
-