           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)
+          # The control is placed after the image display.
+          ctlElt = ng.element(gui.domElement)
+          element.after(ctlElt)
           # Display the controls.
-          volumeCtls.open();
+          volumeCtls.open()
 
         # Adjust the camera position.
         renderer.camera.position = [120, 80, 160]
 
-        # Return the renderer.
-        renderer
+        # Render the image.
+        renderer.render()
 
     # Obtains image objects for the given ImageContainer. The image
     # object content is described in the create() function.

      state:
        loading: false

      # The image binary content.
      data: null

      # Transfers the image file content to the data property.

          @state.loading = false
          # Set the data property to the file content.
          @data = data
      
      # Renders the image in the given parent element.
      #
      # @param element the Angular jQueryLite element
      open: (element) ->
        # The XTK renderer for this image.
        renderer = new X.renderer3D()
        # The image is rendered within the given element.
        renderer.container = element[0]
        # Build the renderer.
        renderer.init()
        # The volume to render.
        volume = new X.volume()
        volume.file = @filename
        volume.filedata = @data
        renderer.add(volume)

        # The rendering callback. This function is called after the
        # volume is initialized and prior to the first rendering.
        renderer.onShowtime = ->
          # The volume display controls. The element is manually
          # placed later in this function.
          gui = new dat.GUI(autoplace: false)
          # The controls interact with the volume.
          volumeCtls = gui.addFolder('Volume')
          # The opacity control.
          opacityCtl = volumeCtls.add(volume, 'opacity', 0, 1).listen()
          # The threshold min and max range controls.
