ImportGeo-Vol Functions
There are several ImportGeo-Vol specific functions to create your own custom image processing filter. These functions do only work if a gray value image is loaded into ImportGeo-Vol. To load a gray value image, you need to run an ImportGeo:GetGrayValueImage command first.
Find examples on how to use these functions in the ImportGeo folder in the GeoDict installation directory. These functions are used to create your own custom image processing filter as described in the ImportGeo-Vol User Guide.
gd.ImportGeoVol.getHistogram
Returns the histogram of the currently loaded image as a python list of tuples containing value and count each.
Input: None
Example:
In the following example the list is written into a *.csv file. If this file is opened with Excel, the gray values are to be found in the first column and the corresponding counts in the second column:
|
gd.ImportGeoVol.getNewImage
Creates a new 3D gray value image matching the size and bit depth as the original image and returns it as a numpy array. Only used in ImportGeo custom python image filters, not in regular macros.
Input: None
|
gd.ImportGeoVol.getNewImageDimensions
Returns the current gray value image size in voxels in the desired direction.
Input:
- direction, integer
- 0 for X-direction, 1 for Y-direction, 2 for Z-direction
Example:
|
gd.ImportGeoVol.getNewImageResized
Creates a new 3D gray value image with the entered dimensions. Only used in ImportGeo custom python image filters, not in regular macros.
Input:
- nx, integer
- number of voxels in x-direction
- ny, integer
- number of voxels in y-direction
- nz, integer
- number of voxels in z-direction
- is 16 bit, bool
- the image can have 16 bit (True) or 8 bits (False).
|
gd.getOriginalImage
Returns the currently loaded gray value image as a 3D 8-bit or 16-bit numpy array. Only used in ImportGeo custom python image filters, not in regular macros.
Input: None
|
gd.ImportGeoVol.getOtsuThreshold
Returns the threshold based on OTSU's method of the currently loaded image as an integer.
Input: None
Example:
|
gd.ImportGeoVol.getMultiOtsuThreshold
Returns the thresholds based on OTSU's method of the currently loaded image as list.
Input: None
Example:
|
gd.ImportGeoVol.getVoxelLength
Returns the currently in ImportGeo-Vol set voxel length.
Input: None
Example: For an example, see below under the setVoxelLength command.
|
gd.ImportGeoVol.setVoxelLength
Changes the currently in ImportGeo-Vol set voxel length to the specified value. This command has no return value.
Input:
Example:
|
gd.ImportGeoVol.getRotationSuggestion
The command returns the rotation suggested for the loaded gray value image.
Input:
- full image, bool
- Suggest full image (True) or plane (False)
- threshold, integer (optional)
Example:
|