       exit: ->
         @el.find('.artifact-classifier').hide() 
 
+  getAsteroidDetection: =>
+    asteroid_detection= 
+      type: "asteroid" 
+      frame: @currentFrame.seqNumber
+    asteroid_detection
+
+  getArtifactDetection: =>
+    art_detection = 
+        type: "artifact" 
+        frame:   @currentFrame.seqNumber
+        subType: @artifactSubtype
+    art_detection
+
+
+
   #ToDo move to model 
 class ImageSet
 

      
    @currentFrame  =  @imageSet.getFrameFromElement('frame-id-0')
    
    # provisional default case of artifact subtype
    artifactSubtype = "other"



  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
