Package grp25.captcha
Class Controller
- java.lang.Object
-
- grp25.captcha.Controller
-
public class Controller extends java.lang.ObjectThe controller class for the FXML.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classController.ImagePatchThe image patch class.
-
Field Summary
Fields Modifier and Type Field Description (package private) javafx.scene.control.ButtonallHab(package private) javafx.scene.control.ButtonallNon(package private) javafx.scene.control.ToggleButtondiffDir(package private) javafx.scene.control.ButtonendBtn(package private) javafx.scene.layout.GridPanegrid(package private) javafx.scene.layout.StackPanegridContainer(package private) javafx.scene.control.LabelimgIdx(package private) javafx.scene.control.LabelimgTotal(package private) javafx.scene.control.ButtonnextBtn(package private) javafx.scene.control.ButtonprevBtn(package private) javafx.scene.control.ButtonsegmentBtn(package private) javafx.scene.control.ButtonsourceBtn(package private) javafx.scene.control.LabelsourceLabel(package private) javafx.scene.control.ButtonstartBtn(package private) javafx.scene.control.ButtonstartWithHabBtn(package private) javafx.scene.control.ButtontargetBtn(package private) javafx.scene.control.LabeltargetLabel(package private) javafx.scene.control.ToggleButtonuseFlatten(package private) javafx.scene.control.LabelxSlicesLabel(package private) javafx.scene.control.SliderxSlicesSlider(package private) javafx.scene.control.LabelySlicesLabel(package private) javafx.scene.control.SliderySlicesSlider
-
Constructor Summary
Constructors Constructor Description Controller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidchooseSource()Handler for the choose source folder button.voidchooseTarget()Handler for the choose target folder button.voidinitialize()Bind a bunch of properties at the beginning of our program.voidnextImg()Set current image to next image in the image array.voidonEnd()Handler for end classifying and export the result.voidonSegment()Handler for the "just segment" button.voidonStart()Handler for the start button (start classifying).voidonStartWithHab()Handler for the "START with all Hab" button (start classifying).voidprevImg()Set current image to previous image in the image array.voidsetAll(javafx.event.ActionEvent e)Set the tags of all the patches of current image.
-
-
-
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
-
-
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.
-
-