code: def create_settings(self):
      self.first_input_image = ImageSubscriber(
          "Select the first input image",
          "None",
          doc="""\
  Specify the name of the first image to align.""",
      )
  
      self.first_output_image = ImageName(
          "Name the first output image",
          "AlignedRed",
          doc="""\
  Enter the name of the first aligned image.""",
      )
  
      self.separator_1 = Divider(line=False)
      self.second_input_image = ImageSubscriber(
          "Select the second input image",
          "None",
          doc="""\
  Specify the name of the second image to align.""",
      )
  
      self.second_output_image = ImageName(
          "Name the second output image",
          "AlignedGreen",
          doc="""\
  Enter the name of the second aligned image.""",
      )
  
      self.separator_2 = Divider(line=False)
      self.additional_images = []
      self.add_button = DoSomething(
          "", "Add another image", self.add_image
      )
  
      self.alignment_method = Choice(
          "Select the alignment method",
          M_ALL,
          doc="""\
  Two options for the alignment method are available:
  
  -  *%(M_MUTUAL_INFORMATION)s:* This more general method works well for
     aligning images from different modalities that contain the same
     information, but are expressed differently. However, this method
     performs better than %(M_CROSS_CORRELATION)s, even in the same
     modality, if the images are not highly correlated. It is iterative,
     and thus tends to be slower than other methods, but is more likely to
     be correct. Essentially, alignment is performed by measuring how well
     one image “explains” the other. For example, a fluorescent image can
     be aligned to a brightfield image by this method since the relevant
     features are bright in one modality where they are dim in the other.
  -  *%(M_CROSS_CORRELATION)s:* This is a good means of alignment in the
     case of images acquired with the same modality (e.g., all images to
     be aligned are fluorescent). It is fast, however it can be highly
     influenced by a particular, possibly spurious, feature and in turn
     generate anomalously large shifts. It allows for a linear
     relationship between the intensities of the two images, i.e., the
     relevant features in the images to be aligned all have varying
     degrees of brightness.
  
  """
          % globals(),
      )
  
      self.crop_mode = Choice(
          "Crop mode",
          [C_CROP, C_PAD, C_SAME_SIZE],
          doc="""\
  The crop mode determines how the output images are either cropped or
  padded after alignment. The alignment phase calculates the areas in each
  image that are found to be overlapping. In almost all cases, there will
  be portions of some or all of the images that don’t overlap with any
  other aligned image. These portions have no counterpart and will be
  excluded from analysis. There are three choices for cropping:
  
  -  *%(C_CROP)s:* Crop every image to the region that overlaps in all
     images. This makes downstream analysis simpler because all of the
     output images have authentic pixel data at all positions, however it
     discards parts of images. Also, the output images may not be the same
     size as the input images which may cause problems if downstream
     modules use aligned and unaligned images (which may be of differing
     sizes) in combination.
  -  *%(C_PAD)s:* Align every image and pad with masked black pixels to
     make each image the same size. This results in larger images, but
     preserves all information in each of the images. This may be the best
     choice if images undergo an operation such as smoothing that could
     use the information that would otherwise be cropped.
  -  *%(C_SAME_SIZE)s:* Maintain the sizes of the images but align them,
     masking the unaligned portions with black pixels. **Align** aligns
     all images relative to the first. This is a reasonable option for
     alignments with small displacements since it maintains a consistent
     image size which may be useful if output images from different image
     sets will be compared against each other after processing. The
     reference image can also be used across image sets. For example, the
     reference image could be loaded for all image sets in a group to
     align the entire group’s images similarly, then the aligned images
     could be combined in a module such as **MakeProjection**.
     """
          % globals(),
      )
  
imports: import numpy
  import scipy.ndimage
  import scipy.sparse
  from centrosome.filter import stretch
  from scipy.fftpack import fft2, ifft2
  from ..constants.measurement import COLTYPE_INTEGER
  from ..image import Image
  from ..module import Module
  from ..setting import Divider, SettingsGroup
  from ..setting.choice import Choice
  from ..setting.do_something import DoSomething, RemoveSettingButton
  from ..setting.subscriber import ImageSubscriber
  from ..setting.text import ImageName
label_desc: Use image node_id 1 for calling the Align obj's underlying member method code with example usage: obj.create_settings() without return types