code: def main():
      args = getArguments(getParser())
  
      # prepare logger
      logger = Logger.getInstance()
      if args.debug:
          logger.setLevel(logging.DEBUG)
      elif args.verbose:
          logger.setLevel(logging.INFO)
  
      # load input image1
      data_input1, _ = load(args.input1)
  
      # load input image2
      data_input2, _ = load(args.input2)
  
      # compare dtype and shape
      if not data_input1.dtype == data_input2.dtype:
          print(
              "Dtype differs: {} to {}".format(
                  data_input1.dtype, data_input2.dtype
              )
          )
      if not data_input1.shape == data_input2.shape:
          print(
              "Shape differs: {} to {}".format(
                  data_input1.shape, data_input2.shape
              )
          )
          print(
              "The voxel content of images of different shape can not be compared. Exiting."
          )
          sys.exit(-1)
  
      # compare image data
      voxel_total = reduce(lambda x, y: x * y, data_input1.shape)
      voxel_difference = len((data_input1 != data_input2).nonzero()[0])
      if not 0 == voxel_difference:
          print(
              "Voxel differ: {} of {} total voxels".format(
                  voxel_difference, voxel_total
              )
          )
          print(
              "Max difference: {}".format(
                  scipy.absolute(data_input1 - data_input2).max()
              )
          )
      else:
          print("No other difference.")
  
      logger.info("Successfully terminated.")
  
file_path: medpy/bin/medpy_diff.py
imports: import sys
  import argparse
  import logging
  import scipy
  from medpy.core import Logger
  from medpy.io import load
  from functools import reduce
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types