def fill_blanks
      if @volumes.length > 0
        # Register all unique images referenced by the various volumes:
        images = Set.new
        # Include the master volume (if it is present):
        [@volumes, @master].flatten.compact.each do |volume|
          volume.bin_images.each do |bin_image|
            images << bin_image.image unless images.include?(bin_image.image)
          end
        end
        # Check if any of the volumes have images missing, and if so, create empty images:
        images.each do |image|
          [@volumes, @master].flatten.compact.each do |volume|
            match = false
            volume.bin_images.each do |bin_image|
              match = true if bin_image.image == image
            end
            unless match
              # Create BinImage:
              bin_img = BinImage.new(NArray.byte(image.columns, image.rows), image)
              volume.add(bin_img)
            end
          end
        end
      end
    end
def fill_blanks
      if @volumes.length > 0
        # Register all unique images referenced by the various volumes:
        images = Set.new
        # Include the master volume (if it is present):
        [@volumes, @master].flatten.compact.each do |volume|
          volume.bin_images.each do |bin_image|
            images << bin_image.image unless images.include?(bin_image.image)
          end
        end
        # Check if any of the volumes have images missing, and if so, create empty images:
        images.each do |image|
          [@volumes, @master].flatten.compact.each do |volume|
            match = false
            volume.bin_images.each do |bin_image|
              match = true if bin_image.image == image
            end
            unless match
              # Create BinImage:
              bin_img = BinImage.new(NArray.byte(image.columns, image.rows), image)
              volume.add(bin_img)
            end
          end
        end
      end
    end
Ensures that a valid comparison between volumes can be done, by making
 sure that every volume has a BinImage for any image that is referenced
 among the BinVolumes. If some BinVolumes are missing one or more
 BinImages, empty BinImages will be created for these BinVolumes.

 @note The master volume (if present) is also processed by this method.