Package grp25.captcha

Class Controller


  • public class Controller
    extends java.lang.Object
    The controller class for the FXML.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  Controller.ImagePatch
      The image patch class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) javafx.scene.control.Button allHab  
      (package private) javafx.scene.control.Button allNon  
      (package private) javafx.scene.control.ToggleButton diffDir  
      (package private) javafx.scene.control.Button endBtn  
      (package private) javafx.scene.layout.GridPane grid  
      (package private) javafx.scene.layout.StackPane gridContainer  
      (package private) javafx.scene.control.Label imgIdx  
      (package private) javafx.scene.control.Label imgTotal  
      (package private) javafx.scene.control.Button nextBtn  
      (package private) javafx.scene.control.Button prevBtn  
      (package private) javafx.scene.control.Button segmentBtn  
      (package private) javafx.scene.control.Button sourceBtn  
      (package private) javafx.scene.control.Label sourceLabel  
      (package private) javafx.scene.control.Button startBtn  
      (package private) javafx.scene.control.Button startWithHabBtn  
      (package private) javafx.scene.control.Button targetBtn  
      (package private) javafx.scene.control.Label targetLabel  
      (package private) javafx.scene.control.ToggleButton useFlatten  
      (package private) javafx.scene.control.Label xSlicesLabel  
      (package private) javafx.scene.control.Slider xSlicesSlider  
      (package private) javafx.scene.control.Label ySlicesLabel  
      (package private) javafx.scene.control.Slider ySlicesSlider  
    • Constructor Summary

      Constructors 
      Constructor Description
      Controller()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void chooseSource()
      Handler for the choose source folder button.
      void chooseTarget()
      Handler for the choose target folder button.
      void initialize()
      Bind a bunch of properties at the beginning of our program.
      void nextImg()
      Set current image to next image in the image array.
      void onEnd()
      Handler for end classifying and export the result.
      void onSegment()
      Handler for the "just segment" button.
      void onStart()
      Handler for the start button (start classifying).
      void onStartWithHab()
      Handler for the "START with all Hab" button (start classifying).
      void prevImg()
      Set current image to previous image in the image array.
      void setAll​(javafx.event.ActionEvent e)
      Set the tags of all the patches of current image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • gridContainer

        javafx.scene.layout.StackPane gridContainer
      • grid

        javafx.scene.layout.GridPane grid
      • sourceLabel

        javafx.scene.control.Label sourceLabel
      • targetLabel

        javafx.scene.control.Label targetLabel
      • imgIdx

        javafx.scene.control.Label imgIdx
      • imgTotal

        javafx.scene.control.Label imgTotal
      • xSlicesLabel

        javafx.scene.control.Label xSlicesLabel
      • ySlicesLabel

        javafx.scene.control.Label ySlicesLabel
      • sourceBtn

        javafx.scene.control.Button sourceBtn
      • targetBtn

        javafx.scene.control.Button targetBtn
      • prevBtn

        javafx.scene.control.Button prevBtn
      • nextBtn

        javafx.scene.control.Button nextBtn
      • startBtn

        javafx.scene.control.Button startBtn
      • startWithHabBtn

        javafx.scene.control.Button startWithHabBtn
      • endBtn

        javafx.scene.control.Button endBtn
      • segmentBtn

        javafx.scene.control.Button segmentBtn
      • allHab

        javafx.scene.control.Button allHab
      • allNon

        javafx.scene.control.Button allNon
      • useFlatten

        javafx.scene.control.ToggleButton useFlatten
      • diffDir

        javafx.scene.control.ToggleButton diffDir
      • xSlicesSlider

        javafx.scene.control.Slider xSlicesSlider
      • ySlicesSlider

        javafx.scene.control.Slider ySlicesSlider
    • Constructor Detail

      • Controller

        public Controller()
    • Method Detail

      • initialize

        public void initialize()
        Bind a bunch of properties at the beginning of our program.
      • chooseSource

        public void chooseSource()
        Handler for the choose source folder button.
      • chooseTarget

        public void chooseTarget()
        Handler for the choose target folder button.
      • onStart

        public void onStart()
        Handler for the start button (start classifying). All patches of all images will be initially set as non-inhabitable.
      • onStartWithHab

        public void onStartWithHab()
        Handler for the "START with all Hab" button (start classifying). All patches of all images will be initially set as inhabitable.
      • onEnd

        public void onEnd()
        Handler for end classifying and export the result.
      • onSegment

        public void onSegment()
        Handler for the "just segment" button. This will just segment images in source folder and export the result.
      • setAll

        public void setAll​(javafx.event.ActionEvent e)
        Set the tags of all the patches of current image.
        Parameters:
        e - the action event. We recognize the button pressed (set all hab or set all non-hab) through this and respond differently.
      • prevImg

        public void prevImg()
        Set current image to previous image in the image array.
      • nextImg

        public void nextImg()
        Set current image to next image in the image array.