           @xtkVolume.filedata = data
           # Set the state to loaded.
           @state = Image.STATES.LOADED
-
+          # Return the loaded image.
+          this
+
+      isLoaded: ->
+        @state == Image.STATES.LOADED
+
+      isLoading: ->
+        @state == Image.STATES.LOADING
+      
       # Renders the image in the given parent element.
       #
       # @param element the Angular jQueryLite element

      # @param image the selected PK modeling parameter name, or 'none' to 
      #  remove an existing overlay
      deselectOverlay: ->
         @xtkVolume.labelmap.visible = false if @xtkVolume.labelmap?

      # Changes the overlay label map and color lookup table as follows:
      # * Fetch the overlay files.

    # * xtkVolume - the XTK volume object
    # * load() - read the image file
    # * open(element) - render the image
    # * isOverlayVisible() - whether there is an associated label map file
    # * selectOverlay() - show the overlay
    # * deselectOverlay() - hide the overlay
    #
