         
 #TODO move to model
 class ImageFrame
-  require ("underscore")
   elementId: ''
   seqNumber: ''
   url: ''

    'change input[name="classifier-type"]': (e) ->

      if e.currentTarget.value == 'asteroid' 
        asteroid_detection= 
          type: "asteroid" 
          frame: @currentFrame.seqNumber
          
        @setState 'asteroidTool change'
        @tool.mark.set 'detection', asteroid_detection
        
      else if  e.currentTarget.value == 'artifact'
        art_detection = 
          type: "artifact" 
          frame:   @currentFrame.seqNumber
          subType: @artifactSubtype
        @setState 'artifactTool'
        @tool.mark.set 'detection', art_detection
        
      else
        console.log("Error: unknown classifier-type")

    'change input[name="selected-artifact"]': =>
     
      #TODO why do I need to place locate  selectedArtifactRadios in elements. 
      # it shoudl be added go  the object scope
      # @artifactSubtype = selectedArtifactRadios.filter(':checked').val() 

    'click button[name="delete"]': ->
      @tool.mark.destroy()


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

  events:
