 
   destroyImage: (img_id) ->
 
+  setMark: ->
+    #TODO state machine is getting messy
+    if @state is "asteroidTool" or "whatKind"  
+      @tool.mark.set 'detection', @getAsteroidDetection()
+    else if @state is "artifactTool"
+      @tool.mark.set 'detection', @getArtifactDetection()
+    else
+      debugger  
+      console.log("Error: marking tool not specified")   
 
   setState: (newState) ->
     if @state

      exit: ->
        @el.find('.artifact-classifier').hide() 

  #ToDo move to model 
class ImageSet



        #   when 'artifact'
        #     #@tool.mark.artifact.set "subtype", @selectedArtifactRadios.value
        #console.log ("noop")
   
    @setState 'whatKind'

  events:
