Please enable JavaScript to view this site.

GeoDict User Guide 2025

User Defined Filter

Own scripts can be used as image filters for your data. Examples for such user-defined scripts can be found in the ImportGeo folder in the GeoDict installation folder and in the GeoDict settings folder.

Therein, the script PhansalkarFilter.py can be used to learn how to obtain and change the image data that is shown in the ImportGeo-Vol box. Click Browse to navigate to the GeoPy macro. Click Edit Script to open the file in a text editor. In the macro use the command

im = gd.ImportGeoVol.getOriginalImage()

to load the actual image with the Python script and

img = gd.ImportGeoVol.getNewImage()

to create a new image.

The dimensions can subsequently be extracted with the “shape” command:

nx=img.shape[0]
ny=img.shape[1]
nz=img.shape[2] 

With loops over each image voxel, the Phansalkar script determines, if the according voxel should be set to white [255] or black [0]. It is sufficient to change the new image (“img”). Please refer to the section Phansalkar and the GeoPy scripting user guide for more details on this topic.

For a parameter macro, the parameters can be edited by clicking Parameters.

To run the macro click Apply.

©2025 created by Math2Market GmbH / Imprint / Privacy Policy