Module: Resample ()
This module works on any 3-dimensional field with regular coordinates, e.g., complex and non-complex scalar or vector fields or RGBA color fields. It lets you Resample the data, i.e., enlarge or shrink the dimensions of the regular grid while recalculating the data according to it. The first port displayed is Input Resolution, which indicates the resolution of the incoming data field to be resampled. If the input field has uniform coordinates, the voxel size is also displayed. The other ports depend on whether the input field contains ordinary numbers or labels as used in image segmentation (see Label Field).For non-labeled data fields you see the Filter, the Mode, the Resolution port and, if the input field has uniform coordinates, you will see the Voxel size port. In case of a labeled data field you see the Average port. Depending on the existence of labeled data the resampling operation is performed differently.
Resampling Non-labeled Data Fields
For non-labeled input data the ports denoted Filter, Mode, Resolution and Voxelsize will be shown.Filter provides an option menu allowing you to specify the filter kernel for the resampling operation. Usually the default kernel, Lanczos, yields sufficiently good results for both minifications and magnifications. The following filters are supported:
- Box: simple replication of scalar values, shows considerably tiling or jaggies
- Triangle: computationally simple, still sharp transition lines
- Bell - smoothing filter
- B-Spline: no sharp transitions, but its width causes excessive blurring
- Lanczos: excessive "ringing" effect
- Mitchell: no sharp transitions, good compromise between "ringing" and "blurring"
- Minimum: useful for down-sampling, preserves tiny dark features on a bright background
- Maximum: useful for down-sampling, preserves tiny bright features on a dark background
- Cubic, width 6: similar to Lanczos
- Cubic, width 8: performs similar to Lanczos
The Minimum and Maximum filters can only be used to downsample non-complex data fields.
Port Mode gives you choices how to specify the resolution of the output field. If you select `dimensions', the Resolution port will be enabled to take your input. If you select `voxel size', the Voxel size port is enabled.
If you connect a second field to the Reference connection, the behavior will be a little bit different. If you select `dimensions', the output field will have the same dimensions as the reference field. If you select `voxel size', the voxel size will be taken from the reference. Additionally the choice `reference' is enabled, which resamples directly onto the lattice that is provided by the reference field.
Press the Apply button to start the resampling.
Resampling Labeled Data Fields
Labeled data fields can only be down-sampled. Instead of Filter and Resolution, a port denoted Average appears. This port allows you to enter the number of cells to average in each direction. Note that no enlargement is possible.As above, the Apply button initiates the resampling.
Coordinates of the Resampled Data Set
Resampling can be performed on any 3-dimensional field with either uniform, stacked, rectilinear, or curvilinear coordinates. The resampling operation does not change the coordinate type. If you want to convert a data set with stacked, rectilinear, or curvilinear coordinates into one with uniform coordinates, you should use the Arithmetic module instead of Resample. The coordinates of the resampled data set are obtained by a resampling operation on the coordinates of the input data set.Note that in general the bounding box of the resampled data set will be different from the one of the input data set. In particular, for uniform coordinates the bounding box will extend from the center of the first voxel to the center of the last one.
Resampling in Progress
While resampling, the progress bar at the bottom of the Properties Area indicates the percentage of resampling that is done. You may cancel the resampling calculation any time by pressing the stop button.
Data [required]
The underlying data field to be resampled.Reference [optional]
A reference lattice. It can provide the new resolution, the new voxel size, or the new lattice.
Input Resolution
Displays the resolution of the input data set.Input Voxel Size
Displays the voxel size of the input data set (if available).Filter
This lets you select one of the resampling filters mentioned above. This will only be visible if the input data set does not contain labels.Mode
This lets you select whether you want to specify the new resolution or the new voxel size. If a reference lattice is connected, the values are taken from there.
Additionally a reference option permits to sample directly onto the points of the reference lattice with a tri-linear interpolation (for box, triangle, minimum, maximum filter selection) or lanczos interpolation (for other choices).
With this reference option, resampling is done before, only in case of one dimension is reduced to much.Resolution
Specifies the resolution of the output data set. This port will only be visible if the input data set does not contain labels.Voxelsize
Specifies the voxel size of the output data set. This port will only be visible if the input data set does not contain labels and has uniform coordinates.Average
Specifies how many labels should be averaged during down-sampling. This port will only be visible if the input data set contains labels.