       #
       # @returns a promise which resolves when the image file
       #   read is completed
-      load: () ->
+      load: ->
         # Set the loading flag.
         @state.loading = true
+        
         # Read the file into an ArrayBuffer. The Coffeescript fat
         # arrow (=>) binds the this variable to the image object
         # rather than the $http request.

          sliceXCtl = volumeCtls.add(volume, 'indexX', 0, volume.range[0] - 1)
          sliceYCtl = volumeCtls.add(volume, 'indexY', 0, volume.range[1] - 1)
          sliceZCtl = volumeCtls.add(volume, 'indexZ', 0, volume.range[2] - 1)
          # Display the controls.
          volumeCtls.open();

        # Adjust the camera position.
        renderer.camera.position = [120, 80, 160]

        # Return the renderer.
        renderer

    # Obtains image objects for the given ImageContainer. The image
    # object content is described in the create() function.

define ['angular', 'xtk', 'file', 'dat'], (ng) ->
  image = ng.module 'qiprofile.image', ['qiprofile.file']

  image.factory 'Image', ['$rootScope', 'File', ($rootScope, File) ->
