def METHOD_NAME(n_array, spacing=(1.0, 1.0, 1.0), origin=(0.0, 0.0, 0.0)):
    dz, dy, dx = n_array.shape
    ox, oy, oz = origin
    sx, sy, sz = spacing
    ox -= sx
    oy -= sy
    oz -= sz
    v_image = numpy_support.numpy_to_vtk(n_array.flat)
    extent = (0, dx - 1, 0, dy - 1, 0, dz - 1)
    # Generating the vtkImageData
    image = vtkImageData()
    image.SetOrigin(ox, oy, oz)
    image.SetSpacing(sx, sy, sz)
    image.SetDimensions(dx - 1, dy - 1, dz - 1)
    # SetNumberOfScalarComponents and SetScalrType were replaced by
    # AllocateScalars
    #  image.SetNumberOfScalarComponents(1)
    #  image.SetScalarType(numpy_support.get_vtk_array_type(n_array.dtype))
    image.AllocateScalars(numpy_support.get_vtk_array_type(n_array.dtype), 1)
    image.SetExtent(extent)
    image.GetPointData().SetScalars(v_image)
    #  image_copy = vtkImageData()
    #  image_copy.DeepCopy(image)
    return image