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

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.MTBImageDouble
All Implemented Interfaces:
MTBImageManipulator, KeyListener, EventListener

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

Class for easy access to Double (hyper)stacks. The Int type is a Non-ImageJ type, thus the data is not a reference to ImagePlus data, but is allocated for this MTBImage object. 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
protected  double[][] m_data
          image data
protected  String[] m_sliceLabels
          slice labels
 
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 MTBImageDouble(int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC)
          Constructor
 
Method Summary
 String getCurrentSliceLabel()
          Get the slice label of the slice specified by the actual slice index
 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 voxel 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 voxel 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)
 void setCurrentSliceLabel(String label)
          Set the slice label of the slice specified by the actual slice index
protected  void updateImagePlus()
          Creates or updates an ImagePlus of Float type from the MTBImage Double data, can be returned by getImagePlus() or displayed by show()
 
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, 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, 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
 

Field Detail

m_data

protected double[][] m_data
image data


m_sliceLabels

protected String[] m_sliceLabels
slice labels

Constructor Detail

MTBImageDouble

protected MTBImageDouble(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. An ImagePlus object of type ImagePlus.GRAY32 (FloatProcessor) is created and double values are casted to float. The ImagePlus diplay range is set to [min, max] of the MTBImage. This ImagePlus does not share memory with this MTBImage.

Specified by:
getImagePlus in class MTBImage
Returns:
ImagePlus object

updateImagePlus

protected void updateImagePlus()
Creates or updates an ImagePlus of Float type from the MTBImage Double data, can be returned by getImagePlus() or displayed by show()

Specified by:
updateImagePlus in class MTBImage

getCurrentSliceLabel

public String getCurrentSliceLabel()
Get the slice label of the slice specified by the actual slice index

Overrides:
getCurrentSliceLabel in class MTBImage
Returns:

setCurrentSliceLabel

public void setCurrentSliceLabel(String label)
Set the slice label of the slice specified by the actual slice index

Overrides:
setCurrentSliceLabel in class MTBImage
Parameters:
label -

getValueInt

public int getValueInt(int x,
                       int y,
                       int z,
                       int t,
                       int c)
Get the voxel 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:
value as int

getValueDouble

public double getValueDouble(int x,
                             int y,
                             int z,
                             int t,
                             int c)
Get the voxel 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:
value as int

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.