|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nih.mipav.model.file.FileBase gov.nih.mipav.model.file.FileHistoLUT
public class FileHistoLUT
HistoLUT reader/writer. This classes incorporates the ability to write/read ModelLUT and ModelRGB information in two ways. The first saves the LUT arrays (not available with ModelRGB), and the second saves the transfer and RGB functions. The LUT transfer Line is saved by default (and likewise opened) when the saveLUT method is called.
NOTE: Reading a LUT does not return a ModelLUT. Rather, it updates the arrays and transfer functions in a provided ModelLUT.
ModelLUT
,
ModelRGB
,
ViewJFrameHistoLUT
,
ViewJFrameHistoRGB
Field Summary |
---|
Fields inherited from class gov.nih.mipav.model.file.FileBase |
---|
BIG_ENDIAN, bitsPerPixel, fileNames, LITTLE_ENDIAN, pBarVisible, raFile, READ, READ_WRITE |
Constructor Summary | |
---|---|
FileHistoLUT(String fileName,
String fileDir)
LUT reader/writer constructor. |
|
FileHistoLUT(String fileName,
String fileDir,
ModelLUT lut)
LUT reader/writer constructor. |
|
FileHistoLUT(String fileName,
String fileDir,
ModelRGB rgb)
RGB reader/writer constructor. |
Method Summary | |
---|---|
void |
readFunctions()
This method reads the transfer and RGB functions associated with a LUT. |
void |
readFunctions(ModelLUT lut)
This method reads the transfer and RGB functions associated with a LUT. |
void |
readFunctions(ModelRGB rgb)
This method reads the transfer and RGB functions associated with a ModelRGB. |
void |
readLUT(boolean quietMode)
This method reads a LUT file and its associated transfer function. |
void |
readLUT(ModelLUT lut,
boolean quietMode)
This method reads a LUT file and its associated transfer function. |
void |
readOnlyLUT(boolean quietMode)
This method reads a LUT file and its associated transfer function. |
void |
readOnlyLUT(ModelLUT lut,
boolean quietMode)
This method reads a LUT file and its associated transfer function. |
void |
readOpacityFunctions(ModelLUT _lut)
This method reads the transfer and RGB functions associated with a LUT. |
void |
readTransferFunction(RandomAccessFile file,
TransferFunction funct)
Reads in a transfer function from a file. |
void |
readUDTransferFunction(String fName,
String dName)
Reads a transfer function (0->1) remaps to min->max and loads into LUT. |
void |
setLUT(ModelLUT lut)
Accessor to set the LUT. |
void |
setOpacityFunction(TransferFunction opacFunction)
Sets the opacity function, which indicates that we want it to be saved / read in with the rest of the transfer functions. |
void |
setRGB(ModelRGB rgb)
Accessor to set the RGB. |
void |
write()
Writes the default ModelLUT or ModelRGB to a file. |
void |
writeAll()
Writes the default ModelLUT or ModelRGB to a file. |
void |
writeFunctions()
Writes the transfer and RGB functions to a file. |
void |
writeLUT()
Writes the default ModelLUT or ModelRGB to a file. |
void |
writeLUT(ModelLUT lut)
Writes a ModelLUT to a file. |
void |
writeOpacityFunctions()
Writes the transfer and RGB functions to a file. |
void |
writeTransferFunction(RandomAccessFile file,
TransferFunction funct,
String name)
Write out a transfer function to a file. |
void |
writeUDTransferFunction(String fName,
String dName)
Remaps the transfer function from 0->1 and writes to a files. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileHistoLUT(String fileName, String fileDir) throws IOException
fileName
- file namefileDir
- file directory
IOException
- if there is an error making the filespublic FileHistoLUT(String fileName, String fileDir, ModelLUT lut) throws IOException
fileName
- file namefileDir
- file directorylut
- the ModelLUT
IOException
- if there is an error making the files, or if lut is nullpublic FileHistoLUT(String fileName, String fileDir, ModelRGB rgb) throws IOException
fileName
- file namefileDir
- file directoryrgb
- the ModelRGB
IOException
- if there is an error making the files, or if rgb is nullMethod Detail |
---|
public void readFunctions() throws IOException
IOException
- if there is an error reading the filepublic void readFunctions(ModelLUT lut) throws IOException
lut
- The ModelLUT that these functions are read to
IOException
- if there is an error reading the filepublic void readFunctions(ModelRGB rgb) throws IOException
rgb
- The ModelRGB that these functions are read to
IOException
- if there is an error reading the filepublic void readLUT(boolean quietMode) throws IOException
quietMode
- if true indicates that warnings should not be displayed.
IOException
- if there is an error reading the filepublic void readLUT(ModelLUT lut, boolean quietMode) throws IOException
lut
- The ModelLUT that the LUT data gets applied toquietMode
- if true indicates that warnings should not be displayed.
IOException
- if there is an error reading the filepublic void readOnlyLUT(boolean quietMode) throws IOException
quietMode
- if true indicates that warnings should not be displayed.
IOException
- if there is an error reading the filepublic void readOnlyLUT(ModelLUT lut, boolean quietMode) throws IOException
lut
- The ModelLUT that the LUT data gets applied toquietMode
- if true indicates that warnings should not be displayed.
IOException
- if there is an error reading the filepublic void readOpacityFunctions(ModelLUT _lut) throws IOException
_lut
- The ModelLUT that these functions are read to
IOException
- if there is an error reading the filepublic void readTransferFunction(RandomAccessFile file, TransferFunction funct) throws IOException
file
- the file to read fromfunct
- the function to add points to
IOException
- if there is a problem reading from the filepublic void readUDTransferFunction(String fName, String dName) throws IOException
fName
- String file namedName
- String dir name
IOException
- DOCUMENT ME!public void setLUT(ModelLUT lut) throws IOException
lut
- the ModelLUT
IOException
- if lut is nullpublic void setOpacityFunction(TransferFunction opacFunction)
opacFunction
- the (grayscale) opacity functionpublic void setRGB(ModelRGB rgb) throws IOException
rgb
- the ModelRGB
IOException
- if rgb is nullpublic void write() throws IOException
IOException
- if there is an error writing the filepublic void writeAll() throws IOException
IOException
- if there is an error writing the filepublic void writeFunctions() throws IOException
IOException
- if there is an error writing the filepublic void writeLUT() throws IOException
IOException
- if there is an error writing the filepublic void writeLUT(ModelLUT lut) throws IOException
lut
- ModelLUT to write
IOException
- if there is an error writing the filepublic void writeOpacityFunctions() throws IOException
IOException
- if there is an error writing the filepublic void writeTransferFunction(RandomAccessFile file, TransferFunction funct, String name) throws IOException
file
- the file to write the function tofunct
- the transfer functionname
- the label to apply to the function data
IOException
- if there is a problem writing out to the filepublic void writeUDTransferFunction(String fName, String dName) throws IOException
fName
- String file namedName
- String dir name
IOException
- DOCUMENT ME!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |