def narray(sort_slices=true)
      if @bin_images.length > 0
        # Determine the slice position of each BinImage:
        locations = Array.new
        if sort_slices
          @bin_images.collect {|image| locations << image.pos_slice}
          images = @bin_images.sort_by_order(locations.sort_order)
        else
          images = @bin_images
        end
        # Create volume array and fill in the images:
        volume = NArray.byte(frames, columns, rows)
        images.each_with_index do |sorted_image, i|
          volume[i, true, true] = sorted_image.narray
        end
        @narr = volume
      end
    end
def narray(sort_slices=true)
      if @bin_images.length > 0
        # Determine the slice position of each BinImage:
        locations = Array.new
        if sort_slices
          @bin_images.collect {|image| locations << image.pos_slice}
          images = @bin_images.sort_by_order(locations.sort_order)
        else
          images = @bin_images
        end
        # Create volume array and fill in the images:
        volume = NArray.byte(frames, columns, rows)
        images.each_with_index do |sorted_image, i|
          volume[i, true, true] = sorted_image.narray
        end
        @narr = volume
      end
    end
Computes a hash code for this object.

 @note Two objects with the same attributes will have the same hash code.

 @return [Fixnum] the object's hash code

 Creates a 3D volume array consisting of the 2d Narray images from the
 BinImage instances that makes up this volume.

 @param [Boolean] sort_slices
 @return [NArray, NilClass] a 3D numerical array (or nil if no binary images are associated)