ij.plugin
Class Slicer
java.lang.Object
ij.plugin.Slicer
- All Implemented Interfaces:
- PlugIn, java.awt.event.ItemListener, java.awt.event.TextListener, java.util.EventListener
public class Slicer
- extends java.lang.Object
- implements PlugIn, java.awt.event.TextListener, java.awt.event.ItemListener
Implements the Image/Stacks/Reslice command. Known shortcomings:
for FREELINE or POLYLINE ROI, spatial calibration is ignored:
the image is sampled at constant _pixel_ increments (distance 1), so
(if y/x aspect ratio != 1 in source image) one dimension in the output is not
homogeneous (i.e. pixelWidth not the same everywhere).
Method Summary |
(package private) ImageStack |
createOutputStack(ImagePlus imp,
ImageProcessor ip)
|
(package private) void |
doIrregularSetup(ij.gui.Roi roi)
|
(package private) void |
drawLine(double x1,
double y1,
double x2,
double y2,
ImagePlus imp)
|
(package private) int |
getAvailableMemory()
|
(package private) float[] |
getIrregularProfile(ij.gui.Roi roi,
ImageProcessor ip)
|
(package private) int |
getOutputStackSize(double inSpacing,
double outSpacing,
int count)
|
(package private) java.lang.String |
getSize(double inSpacing,
double outSpacing,
int count)
|
(package private) ImageProcessor |
getSlice(ImagePlus imp,
double x1,
double y1,
double x2,
double y2,
java.lang.String status)
|
void |
itemStateChanged(java.awt.event.ItemEvent e)
|
(package private) void |
makePolygon(int count,
double outSpacing)
|
void |
putColumn(ImageProcessor ip,
int x,
int y,
float[] data,
int length)
|
void |
putRow(ImageProcessor ip,
int x,
int y,
float[] data,
int length)
|
ImagePlus |
reslice(ImagePlus imp)
|
(package private) ImagePlus |
resliceRectOrLine(ImagePlus imp)
|
void |
run(java.lang.String arg)
This method is called when the plugin is loaded. |
(package private) void |
saveLineInfo(ij.gui.Roi roi)
|
(package private) boolean |
showDialog(ImagePlus imp)
|
void |
textValueChanged(java.awt.event.TextEvent e)
|
(package private) void |
updateSize()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Slicer
public Slicer()
run
public void run(java.lang.String arg)
- Description copied from interface:
PlugIn
- This method is called when the plugin is loaded.
'arg', which may be blank, is the argument specified
for this plugin in IJ_Props.txt.
- Specified by:
run
in interface PlugIn
reslice
public ImagePlus reslice(ImagePlus imp)
showDialog
boolean showDialog(ImagePlus imp)
saveLineInfo
void saveLineInfo(ij.gui.Roi roi)
resliceRectOrLine
ImagePlus resliceRectOrLine(ImagePlus imp)
createOutputStack
ImageStack createOutputStack(ImagePlus imp,
ImageProcessor ip)
getSlice
ImageProcessor getSlice(ImagePlus imp,
double x1,
double y1,
double x2,
double y2,
java.lang.String status)
putRow
public void putRow(ImageProcessor ip,
int x,
int y,
float[] data,
int length)
putColumn
public void putColumn(ImageProcessor ip,
int x,
int y,
float[] data,
int length)
getIrregularProfile
float[] getIrregularProfile(ij.gui.Roi roi,
ImageProcessor ip)
doIrregularSetup
void doIrregularSetup(ij.gui.Roi roi)
drawLine
void drawLine(double x1,
double y1,
double x2,
double y2,
ImagePlus imp)
textValueChanged
public void textValueChanged(java.awt.event.TextEvent e)
- Specified by:
textValueChanged
in interface java.awt.event.TextListener
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent e)
- Specified by:
itemStateChanged
in interface java.awt.event.ItemListener
updateSize
void updateSize()
getSize
java.lang.String getSize(double inSpacing,
double outSpacing,
int count)
makePolygon
void makePolygon(int count,
double outSpacing)
getOutputStackSize
int getOutputStackSize(double inSpacing,
double outSpacing,
int count)
getAvailableMemory
int getAvailableMemory()