edu.jhu.ece.iacl.jist.io
Class MipavController

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.io.MipavController

public class MipavController
extends java.lang.Object

Image Manipulation Utilities that require ViewUserInterface.

Author:
Blake Lucas

Field Summary
protected static boolean quiet
          The quiet.
protected static java.io.File relativePath
          The relative path.
protected static java.io.File truePath
          The true path.
protected static java.io.File workingDirectory
          The working directory.
 
Constructor Summary
MipavController()
           
 
Method Summary
static void displayError(java.lang.String message)
          Display error.
static void displayMessage(java.lang.String message)
          Display message.
static java.io.File getDefaultWorkingDirectory()
          Gets the default working directory.
static ModelImage getImageByName(java.lang.String name)
          Select an image from the registry by image name.
static java.util.Vector<java.lang.String> getImageNames()
          Get the names of all registered MIPAV images.
static java.util.Vector<ModelImage> getImages()
          Get all registered MIPAV images.
static ImageVariableTable getImageVariableTable()
          Gets the image variable table.
static ViewUserInterface getUI()
          Singleton method to get User Interface.
static void init()
          Inits the.
static boolean isQuiet()
          Checks if is quiet.
static java.util.ArrayList<ImageData> openFileDialog(java.io.File oldFile)
          Create open file dialog to select either RAW or XML file types.
static void setDefaultWorkingDirectory(java.io.File f)
          Sets the default working directory.
static void setImageVariableTable(ImageVariableTable imgTable)
          Sets the image variable table.
static void setQuiet(boolean q)
          Sets the quiet.
static void setRelativePath(java.io.File relativeP)
          Sets the relative path.
static void setRelativePath(java.io.File relativeP, java.io.File trueP)
          Sets the relative path.
static java.io.File translatePath(java.io.File f)
          Translate path.
static void updateFileInfo(FileInfoBase info, ModelImage resultImage)
          Copy important file information between ModelImage structures, assuming all slices have same properties (uses only the first slice from the source).
static void updateFileInfo(ModelImage image, ModelImage resultImage)
          Copy important file information between ModelImage structures, assuming all slices have same properties (uses only the first slice from the source).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workingDirectory

protected static java.io.File workingDirectory
The working directory.


relativePath

protected static java.io.File relativePath
The relative path.


truePath

protected static java.io.File truePath
The true path.


quiet

protected static boolean quiet
The quiet.

Constructor Detail

MipavController

public MipavController()
Method Detail

setImageVariableTable

public static void setImageVariableTable(ImageVariableTable imgTable)
Sets the image variable table.

Parameters:
imgTable - the new image variable table

getImageVariableTable

public static ImageVariableTable getImageVariableTable()
Gets the image variable table.

Returns:
the image variable table

init

public static void init()
Inits the.


openFileDialog

public static java.util.ArrayList<ImageData> openFileDialog(java.io.File oldFile)
Create open file dialog to select either RAW or XML file types.

Parameters:
oldFile - the old file
Returns:
selected image

setDefaultWorkingDirectory

public static void setDefaultWorkingDirectory(java.io.File f)
Sets the default working directory.

Parameters:
f - the new default working directory

getDefaultWorkingDirectory

public static java.io.File getDefaultWorkingDirectory()
Gets the default working directory.

Returns:
the default working directory

getImages

public static java.util.Vector<ModelImage> getImages()
Get all registered MIPAV images.

Returns:
list of registered images

getImageByName

public static ModelImage getImageByName(java.lang.String name)
Select an image from the registry by image name.

Parameters:
name - image name
Returns:
image

getImageNames

public static java.util.Vector<java.lang.String> getImageNames()
Get the names of all registered MIPAV images.

Returns:
list of image names

setRelativePath

public static void setRelativePath(java.io.File relativeP,
                                   java.io.File trueP)
Sets the relative path.

Parameters:
relativeP - the relative p
trueP - the true p

setRelativePath

public static void setRelativePath(java.io.File relativeP)
Sets the relative path.

Parameters:
relativeP - the new relative path

translatePath

public static java.io.File translatePath(java.io.File f)
Translate path.

Parameters:
f - the f
Returns:
the file

setQuiet

public static void setQuiet(boolean q)
Sets the quiet.

Parameters:
q - the new quiet

isQuiet

public static boolean isQuiet()
Checks if is quiet.

Returns:
true, if is quiet

getUI

public static ViewUserInterface getUI()
Singleton method to get User Interface.

Returns:
userInterface

displayMessage

public static void displayMessage(java.lang.String message)
Display message.

Parameters:
message - the message

displayError

public static void displayError(java.lang.String message)
Display error.

Parameters:
message - the message

updateFileInfo

public static final void updateFileInfo(ModelImage image,
                                        ModelImage resultImage)
Copy important file information between ModelImage structures, assuming all slices have same properties (uses only the first slice from the source).

Parameters:
image - the image
resultImage - the result image

updateFileInfo

public static final void updateFileInfo(FileInfoBase info,
                                        ModelImage resultImage)
Copy important file information between ModelImage structures, assuming all slices have same properties (uses only the first slice from the source).

Parameters:
info - the info
resultImage - the result image