de.unihalle.informatik.MiToBo.core.datatypes.images
Class MTBImageFloat

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDData
      extended by de.unihalle.informatik.MiToBo.core.datatypes.images.MTBImage
          extended by de.unihalle.informatik.MiToBo.core.datatypes.images.MTBImageFloat
All Implemented Interfaces:
MTBImageManipulator, KeyListener, EventListener

@ALDMetaInfo(export=MANDATORY)
public class MTBImageFloat
extends MTBImage

Wrapper class for easy access to Float (hyper)stacks. Indices range is different from ImageJ Here, indices in each dimension range from 0 to (dimSize - 1), while ImageJ stack indices range from 1 to dimSize.

Author:
gress

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.MiToBo.core.datatypes.images.MTBImage
MTBImage.FactoryMethod, MTBImage.MTBImageFactory, MTBImage.MTBImageType
 
Field Summary
 
Fields inherited from class de.unihalle.informatik.MiToBo.core.datatypes.images.MTBImage
calibration, m_currentC, m_currentSliceIdx, m_currentT, m_img, m_imgStack, m_sizeC, m_sizeStack, m_sizeT, m_sizeX, m_sizeY, m_sizeZ, m_title, m_type, UNTITLED, xml
 
Constructor Summary
protected MTBImageFloat(ij.ImagePlus img)
          Constructor
protected MTBImageFloat(int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC)
          Constructor
 
Method Summary
 ij.ImagePlus getImagePlus()
          Get an ImagePlus object.
 double[] getMinMaxDouble()
          Get minimum and maximum value of the image as double
 int[] getMinMaxInt()
          Get minimum and maximum value of the image as int
 double getValueDouble(int x, int y)
          Get the value of the actual slice at coordinate (x,y) as an Double
 double getValueDouble(int x, int y, int z)
          Get the voxel value of the actual z-stack at coordinate (x,y,z) No test of coordinate validity
 double getValueDouble(int x, int y, int z, int t, int c)
          Get the value of the 5D image at coordinate (x,y,z,t,c) No test of coordinate validity
 int getValueInt(int x, int y)
          Get the value of the actual slice at coordinate (x,y) as an Integer
 int getValueInt(int x, int y, int z)
          Get the voxel value of the actual z-stack at coordinate (x,y,z) No test of coordinate validity
 int getValueInt(int x, int y, int z, int t, int c)
          Get the value of the 5D image at coordinate (x,y,z,t,c) No test of coordinate validity
 void putValueDouble(int x, int y, double value)
          Set the value of the actual slice at coordinate (x,y) using a Double
 void putValueDouble(int x, int y, int z, double value)
          Set the voxel value of the actual z-stack at coordinate (x,y,z)
 void putValueDouble(int x, int y, int z, int t, int c, double value)
          Set the voxel value of the 5D image at coordinate (x,y,z,t,c)
 void putValueInt(int x, int y, int value)
          Set the value of the actual slice at coordinate (x,y) using an Integer
 void putValueInt(int x, int y, int z, int value)
          Set the voxel value of the actual z-stack at coordinate (x,y,z)
 void putValueInt(int x, int y, int z, int t, int c, int value)
          Set the voxel value of the 5D image at coordinate (x,y,z,t,c)
protected  void updateImagePlus()
          Does nothing, because the underlying ImagePlus is updated immediately when values are changed in the MTBImage
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.datatypes.images.MTBImage
adoptSliceLabels, close, convertType, convertType, copyPhysicalProperties, createMTBImage, createMTBImage, createMTBImageByte, drawLine2D, drawPoint2D, duplicate, duplicate, equals, equalSize, fillBlack, fillWhite, getCalibration, getCurrentSlice, getCurrentSlice, getCurrentSliceCoords, getCurrentSliceIndex, getCurrentSliceLabel, getCurrentZStackCoords, getImagePart, getImagePart, getSizeC, getSizeStack, getSizeT, getSizeX, getSizeY, getSizeZ, getSlice, getSlice, getSliceLabel, getStepsizeT, getStepsizeX, getStepsizeY, getStepsizeZ, getTitle, getTitleRunning, getType, getTypeMax, getTypeMin, getTypeName, getUnitT, getUnitX, getUnitY, getUnitZ, getXML, hasImagePlus, isValidType, keyPressed, keyReleased, keyTyped, ordinalToType, scaleValues, setCalibration, setCurrentSlice, setCurrentSliceCoords, setCurrentSliceIndex, setCurrentSliceLabel, setCurrentZStackCoordinates, setImagePart, setSlice, setSliceLabel, setStepsizeT, setStepsizeX, setStepsizeY, setStepsizeZ, setTitle, setUnitT, setUnitX, setUnitY, setUnitZ, setXML, show, stringToType, toString, updateAndRepaintWindow, updateImageSize_ImgToProp, updatePhysProperties_ImgToProp, updatePhysProperties_PropToImg
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MTBImageFloat

protected MTBImageFloat(ij.ImagePlus img)
Constructor

Parameters:
img -

MTBImageFloat

protected MTBImageFloat(int sizeX,
                        int sizeY,
                        int sizeZ,
                        int sizeT,
                        int sizeC)
Constructor

Parameters:
sizeX - size in x-dimension
sizeY - size in y-dimension
sizeZ - size in z-dimension
sizeT - size in t-dimension
sizeC - size in c-dimension
Method Detail

getImagePlus

public ij.ImagePlus getImagePlus()
Get an ImagePlus object. A reference to the underlying ImagePlus is returned.

Specified by:
getImagePlus in class MTBImage
Returns:
ImagePlus object

updateImagePlus

protected void updateImagePlus()
Does nothing, because the underlying ImagePlus is updated immediately when values are changed in the MTBImage

Specified by:
updateImagePlus in class MTBImage

getValueInt

public int getValueInt(int x,
                       int y,
                       int z,
                       int t,
                       int c)
Get the value of the 5D image at coordinate (x,y,z,t,c) No test of coordinate validity

Specified by:
getValueInt in interface MTBImageManipulator
Specified by:
getValueInt in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
t - t-coordinate ranging from 0 to (sizeT - 1)
c - c-coordinate ranging from 0 to (sizeC - 1)
Returns:
voxel value

getValueDouble

public double getValueDouble(int x,
                             int y,
                             int z,
                             int t,
                             int c)
Get the value of the 5D image at coordinate (x,y,z,t,c) No test of coordinate validity

Specified by:
getValueDouble in interface MTBImageManipulator
Specified by:
getValueDouble in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
t - t-coordinate ranging from 0 to (sizeT - 1)
c - c-coordinate ranging from 0 to (sizeC - 1)
Returns:
voxel value

putValueInt

public void putValueInt(int x,
                        int y,
                        int z,
                        int t,
                        int c,
                        int value)
Set the voxel value of the 5D image at coordinate (x,y,z,t,c)

Specified by:
putValueInt in interface MTBImageManipulator
Specified by:
putValueInt in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
t - t-coordinate ranging from 0 to (sizeT - 1)
c - c-coordinate ranging from 0 to (sizeC - 1)
value - to set the voxel to

putValueDouble

public void putValueDouble(int x,
                           int y,
                           int z,
                           int t,
                           int c,
                           double value)
Set the voxel value of the 5D image at coordinate (x,y,z,t,c)

Specified by:
putValueDouble in interface MTBImageManipulator
Specified by:
putValueDouble in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
t - t-coordinate ranging from 0 to (sizeT - 1)
c - c-coordinate ranging from 0 to (sizeC - 1)
value - to set the voxel to

getValueInt

public int getValueInt(int x,
                       int y,
                       int z)
Get the voxel value of the actual z-stack at coordinate (x,y,z) No test of coordinate validity

Specified by:
getValueInt in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
Returns:
value as int

getValueDouble

public double getValueDouble(int x,
                             int y,
                             int z)
Get the voxel value of the actual z-stack at coordinate (x,y,z) No test of coordinate validity

Specified by:
getValueDouble in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
Returns:
value as int

putValueInt

public void putValueInt(int x,
                        int y,
                        int z,
                        int value)
Set the voxel value of the actual z-stack at coordinate (x,y,z)

Specified by:
putValueInt in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
value - to set the voxel to

putValueDouble

public void putValueDouble(int x,
                           int y,
                           int z,
                           double value)
Set the voxel value of the actual z-stack at coordinate (x,y,z)

Specified by:
putValueDouble in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
z - z-coordinate ranging from 0 to (sizeZ - 1)
value - to set the voxel to

getValueInt

public int getValueInt(int x,
                       int y)
Get the value of the actual slice at coordinate (x,y) as an Integer

Specified by:
getValueInt in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
Returns:
voxel value

getValueDouble

public double getValueDouble(int x,
                             int y)
Get the value of the actual slice at coordinate (x,y) as an Double

Specified by:
getValueDouble in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
Returns:
voxel value

putValueInt

public void putValueInt(int x,
                        int y,
                        int value)
Set the value of the actual slice at coordinate (x,y) using an Integer

Specified by:
putValueInt in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
value - to set the voxel to

putValueDouble

public void putValueDouble(int x,
                           int y,
                           double value)
Set the value of the actual slice at coordinate (x,y) using a Double

Specified by:
putValueDouble in class MTBImage
Parameters:
x - x-coordinate ranging from 0 to (sizeX - 1)
y - y-coordinate ranging from 0 to (sizeY - 1)
value - to set the voxel to

getMinMaxInt

public int[] getMinMaxInt()
Get minimum and maximum value of the image as int

Specified by:
getMinMaxInt in class MTBImage
Returns:
min at int[0], max at int[1]

getMinMaxDouble

public double[] getMinMaxDouble()
Get minimum and maximum value of the image as double

Specified by:
getMinMaxDouble in class MTBImage
Returns:
min at double[0], max at double[1]


Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.