Alignment

This category contains 8 operator(s).

class AutoTiltAxisShiftAlignment

Auto Tilt Axis Shift Align

Automatically center images along the tilt axis

transform(self, dataset, transform_source: str = 'generate', transform_file: str = '', padding: int = 0, num_slices: int = 5, seed: int = 0, apply_to_all_arrays: bool = True, transforms_save_file: str = '')
Parameters
  • transform_source (enumeration) - The source of the shift transformation value (i. e., generate it, load it from a file, etc.)

    • default: 'generate'

    • options:

      • 'generate' - Generate

      • 'from_file' - Load From File

  • transform_file (file) - Transformation file (npz format) to apply

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'from_file'

  • padding (int) - Array padding along non-tilt axes when determining the shift

    • default: 10

    • minimum: 0

    • maximum: 1000000

    • visible if: transform_source == 'generate'

  • num_slices (int) - Number of slices to randomly sample to determine ideal recon shift.

    • default: 5

    • minimum: 2

    • maximum: 1000000

    • visible if: transform_source == 'generate'

  • seed (int) - Seed for the random number generator used to select slices. The seed is kept here so that when the pipeline is re-ran, the results are reproducible

    • default: 0

    • minimum: 0

    • maximum: 1000000000

    • visible if: transform_source == 'generate'

  • apply_to_all_arrays (bool) - Apply the shift alignment to all arrays within this data source (not just the currently selected one). The shift is computed only using the currently selected array.

    • default: True

  • transforms_save_file (save_file) - Save transformations file to apply to other datasets later. Leave this blank to not save it.

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'generate'

Implementation
  • Python script: AutoTiltAxisShiftAlignment.py

  • JSON descriptor: AutoTiltAxisShiftAlignment.json

class PyStackRegImageAlignment

Auto Tilt Image Align (PyStackReg)

Perform image alignment using PyStackReg.

transform(dataset, transform_source='generate', padding=0, apply_to_all_arrays=True, # Only used if `transform_source` is `generate` transform_type='translation', reference='previous', transforms_save_file='', # Only used if `transform_type` is `slice_index` ref_slice_index=0, # Only used if `transform_source` is `from_file`. transform_file=None)
Parameters
  • transform_source (enumeration) - The source of the transformation matrices (i. e., generate them, load them from a file, etc.)

    • default: 'generate'

    • options:

      • 'generate' - Generate

      • 'from_file' - Load From File

  • transform_type (enumeration) - Transformation type for the registration

    • default: 'translation'

    • options:

      • 'translation' - Translation

      • 'rigid body' - Rigid Body

      • 'scaled rotation' - Scaled Rotation

      • 'affine' - Affine

      • 'bilinear' - Bilinear

    • visible if: transform_source == 'generate'

  • transform_file (file) - Transformation file (npz format) to apply

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'from_file'

  • padding (int) - Array padding along non-tilt axes before registration

    • default: 10

    • minimum: 0

    • maximum: 1000000

    • visible if: transform_source == 'generate'

  • reference (enumeration) - The reference slice to use when determining the registration transformation for each slice.

    • default: 'slice_index'

    • options:

      • 'previous' - Previous

      • 'first' - First

      • 'mean' - Mean

      • 'slice_index' - SliceIndex

    • visible if: transform_source == 'generate'

  • ref_slice_index (int) - Slice index to use for the reference

    • default: 0

    • minimum: 0

    • maximum: 1000000

    • visible if: transform_source == 'generate'

    • enabled if: reference == 'slice_index'

  • apply_to_all_arrays (bool) - Apply the registration transformation to all arrays within this data source (not just the currently selected one). The registration transformation is computed only using the currently selected array.

    • default: True

  • transforms_save_file (save_file) - Save transformations file to apply to other datasets later. Leave this blank to not save it.

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'generate'

Implementation
  • Python script: PyStackRegImageAlignment.py

  • JSON descriptor: PyStackRegImageAlignment.json

class AutoCrossCorrelationTiltImageAlignment

Auto Tilt Image Align (XCORR)

Automatically align tilt images by cross-correlation

transform(self, dataset, transform_source='generate', apply_to_all_arrays=True, transforms_save_file='', transform_file=None)
Parameters
  • transform_source (enumeration) - The source of the transformation shifts (i. e., generate them, load them from a file, etc.)

    • default: 'generate'

    • options:

      • 'generate' - Generate

      • 'from_file' - Load From File

  • transform_file (file) - Transformation file (npz format) to apply

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'from_file'

  • transforms_save_file (save_file) - Save transformations file to apply to other datasets later. Leave this blank to not save it.

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'generate'

  • apply_to_all_arrays (bool) - Apply the transformation shifts to all arrays within this data source (not just the currently selected one). The transformation is computed only using the currently selected array.

    • default: True

Implementation
  • Python script: AutoCrossCorrelationTiltImageAlignment.py

  • JSON descriptor: AutoCrossCorrelationTiltImageAlignment.json

class RotationAlign

Rotation Alignment

Align the rotation axis of a tilt series to the x-axis.

transform(dataset, SHIFT=None, rotation_angle=90.0, tilt_axis=0)
Parameters
  • SHIFT (double) - Amount to shift by.

    • default: [0.0, 0.0, 0.0]

  • rotation_angle (double) - Rotation angle in degrees.

    • default: 90.0

    • minimum: -360.0

    • maximum: 360.0

  • tilt_axis (int) - The tilt axis (0 for X, 1 for Y).

    • default: 0

    • minimum: 0

    • maximum: 1

Implementation
  • Python script: RotationAlign.py

  • JSON descriptor: RotationAlign.json

class Shift3D

Shift

Shift a dataset.

transform(dataset, SHIFT=None)
Parameters
  • SHIFT (double) - Amount to shift by.

    • default: [0.0, 0.0, 0.0]

    • minimum: [-999, -999, -999]

    • maximum: [999, 999, 999]

Implementation
  • Python script: Shift3D.py

  • JSON descriptor: Shift3D.json

class ShiftRotationCenter_tomopy

Shift Rotation Center

Shift projections so the rotation center is at the image midpoint

Note

This operator is not compatible with external Python execution.

transform(dataset, rotation_center=0, transform_source='manual', transform_file='', transforms_save_file='')
Parameters
  • rotation_center (double) - Offset of the rotation center from the image midpoint (0 = centered)

    • default: 0.0

    • precision: 3 decimal places

  • transform_source (enumeration) - The source of the rotation center value (i.e., set it manually or load from a file)

    • default: 'manual'

    • options:

      • 'manual' - Manual

      • 'from_file' - Load From File

  • transform_file (file) - Transformation file (npz format) to apply

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'from_file'

  • transforms_save_file (save_file) - Save transformations file to apply to other datasets later. Leave this blank to not save it.

    • file filter: NPZ files (*npz)

    • visible if: transform_source == 'manual'

Implementation
  • Python script: ShiftRotationCenter_tomopy.py

  • JSON descriptor: ShiftRotationCenter_tomopy.json

class ShiftTiltSeriesRandomly

Shift Tilt Series Randomly

Apply random integer shifts to tilt series. The maximum shift can be specified betow.

transform(self, dataset, maxShift=1)
Parameters
  • maxShift (int) - Max shift to apply

    • default: 1

    • minimum: 0

Implementation
  • Python script: ShiftTiltSeriesRandomly.py

  • JSON descriptor: ShiftTiltSeriesRandomly.json

class Shift_Stack_Uniformly

Shift Volume

Shift the volume. Voxels that roll beyond the last position in each dimension are re-introduced at the first position.

transform(dataset, shift=[0, 0, 0])
Parameters
  • unknown (xyz_header)

  • shift (int) - The shift to apply

    • default: [0, 0, 0]

    • minimum: negative_size

    • maximum: size

Implementation
  • Python script: Shift_Stack_Uniformly.py

  • JSON descriptor: Shift_Stack_Uniformly.json