Module: Resample Transformed Image ()
Every data object in can carry a transformation . But only the visualization of a field is changed, not the representation in memory. That means if you scale a field with the Transform Editor, dimensions and voxel size will be retained although the size seems to be different on the screen. If you rotate a field, the directions of the sampling planes will still be parallel to the local axis but no longer parallel to the global axis. The module Resample Transformed Image tries to create a new field in a way that it is displayed like the source field attached to the Data connection but without transformation.You can e.g., align one field to another and apply the transformation. Afterward you can directly work with the two fields without having to take into account any transformation.
There are two different ways to use the module:
- You can sample onto a given reference lattice.
- You can give a plane, e.g., a Slice. The result is sampled in planes parallel to the given plane.
Limitation
- If the source field is a Label field, there is only one interpolation method available: Nearest Neighbor.
Applying a Transformation
Proceed as follows: Transform the field with the Transform Editor, the Register Images module or any other way that creates a transformation. If you're satisfied with the transformation, attach an Resample Transformed Image module to the field. Now you have to choose some options.The Interpolation method:
- Nearest Neighbor chooses for every new voxel the value of the voxel in the source field nearest to it.
- Standard interpolates linearly between the surrounding voxels.
- Lanczos is the slowest but most accurate method that tries to approximate a low-pass filter that is in accordance with the sampling theorem. If you have time and want to get the best result, use this one.
The Mode:
- cropped: The new field has the same dimensions and size as the source field. It is adjusted to contain as much as possible of the source field.
- extended: The new field's size is adjusted to contain all of the original field. To do this, the voxel size or the dimensions have to be changed. If you select this mode, the Preserve port is made visible.
The Preserve port:
- Voxel Size: Adjust the result field's dimensions in a way that it has the same voxel size as the source field. Warning: This may lead to huge dimensions.
- Dimensions: The result field will have the same dimensions as the source field.
After choosing the options, press Apply and proceed.
Sampling Onto a Reference Lattice
Connect the source field to Data. Connect the reference field to Reference. Choose an Interpolation method. Press Apply and here we go.
Sampling Parallel to a Given Plane
Connect the source field to Data. Connect a plane (e.g., Slice) to Reference. Choose an Interpolation method. Choose whether the result has the same dimensions (cropped) or the result is extended to contain all of the source field. Press Apply and the result is created. The result will have a transformation attached to it in a way that the sampling planes are displayed parallel to the reference plane. Use the Transform Editor if you want to get rid of the transformation.
Data [required]
The source field. The module operates on any regular 3D field with uniform coordinates and an arbitrary number of data components per node.Reference [optional]
A regular field with uniform coordinates providing a reference lattice or a plane defining a sampling direction.
Interpolation
The interpolation method that will be used.Mode
The result can be cropped to have the same properties as the source or it will be extended to contain all of the source field.Preserve
If the result is extended, should it keep Voxel Size or the Dimensions of the source.PaddingValue
The value used to fill the new cells when the result is extended.