Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Zellige-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IdA Public
Zellige-core
Commits
a2719342
Commit
a2719342
authored
3 months ago
by
Céline TREBEAU
Browse files
Options
Downloads
Patches
Plain Diff
code cleanup
parent
9d7da8d7
No related branches found
No related tags found
2 merge requests
!47
Feature : Multi-channel and Binning
,
!41
Resolve "Consider rescaling (binning) large images"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/fr/pasteur/ida/zellige/gui/model/ConstructionModel.java
+5
-56
5 additions, 56 deletions
...a/fr/pasteur/ida/zellige/gui/model/ConstructionModel.java
with
5 additions
and
56 deletions
src/main/java/fr/pasteur/ida/zellige/gui/model/ConstructionModel.java
+
5
−
56
View file @
a2719342
...
@@ -31,12 +31,6 @@ package fr.pasteur.ida.zellige.gui.model;
...
@@ -31,12 +31,6 @@ package fr.pasteur.ida.zellige.gui.model;
import
fr.pasteur.ida.zellige.element.ReferenceSurface
;
import
fr.pasteur.ida.zellige.element.ReferenceSurface
;
import
fr.pasteur.ida.zellige.element.Surface
;
import
fr.pasteur.ida.zellige.element.Surface
;
import
fr.pasteur.ida.zellige.gui.ZDoubleProperty
;
import
fr.pasteur.ida.zellige.gui.ZDoubleProperty
;
import
fr.pasteur.ida.zellige.gui.controller.MainController
;
import
fr.pasteur.ida.zellige.gui.task.AbstractTask
;
import
fr.pasteur.ida.zellige.gui.task.RunFirstConstructionTask
;
import
fr.pasteur.ida.zellige.gui.task.RunSecondConstructionTask
;
import
fr.pasteur.ida.zellige.steps.construction.exception.FirstRoundConstructionException
;
import
fr.pasteur.ida.zellige.steps.construction.exception.SecondRoundConstructionException
;
import
javafx.beans.property.IntegerProperty
;
import
javafx.beans.property.IntegerProperty
;
import
javafx.beans.property.SimpleBooleanProperty
;
import
javafx.beans.property.SimpleBooleanProperty
;
import
javafx.beans.property.SimpleIntegerProperty
;
import
javafx.beans.property.SimpleIntegerProperty
;
...
@@ -53,8 +47,6 @@ import org.slf4j.LoggerFactory;
...
@@ -53,8 +47,6 @@ import org.slf4j.LoggerFactory;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
static
fr
.
pasteur
.
ida
.
zellige
.
gui
.
MainAppFrame
.
GUI_MARKER
;
public
class
ConstructionModel
<
T
extends
RealType
<
T
>
&
NativeType
<
T
>
>
public
class
ConstructionModel
<
T
extends
RealType
<
T
>
&
NativeType
<
T
>
>
{
{
...
@@ -91,54 +83,6 @@ public class ConstructionModel< T extends RealType< T > & NativeType< T > >
...
@@ -91,54 +83,6 @@ public class ConstructionModel< T extends RealType< T > & NativeType< T > >
surfaceSize
=
new
ZDoubleProperty
();
surfaceSize
=
new
ZDoubleProperty
();
}
}
public
void
firstRound
()
{
LOGGER
.
info
(
GUI_MARKER
,
"Computing first round construction..."
);
AbstractTask
<
ArrayList
<
Surface
>
>
firstRoundTask
=
new
RunFirstConstructionTask
(
maximums
.
getValue
(),
st1
.
doubleValue
(),
r1
.
intValue
(),
c1
.
doubleValue
(),
surfaceSize
.
doubleValue
()
/
100.0
);
firstRoundTask
.
setOnSucceeded
(
workerStateEvent
->
{
firstRoundSurfaces
.
setValue
(
firstRoundTask
.
getValue
()
);
if
(
firstRoundTask
.
getValue
()
==
null
)
{
LOGGER
.
info
(
""
);
//TODO write right message
MainController
.
showError
(
new
FirstRoundConstructionException
()
);
}
}
);
LOGGER
.
info
(
GUI_MARKER
,
"First round construction done."
);
firstRoundTask
.
start
();
}
public
void
secondRound
()
{
LOGGER
.
info
(
GUI_MARKER
,
"Computing second round construction..."
);
AbstractTask
<
ArrayList
<
Surface
>
>
secondRoundTask
=
new
RunSecondConstructionTask
(
firstRoundSurfacesProperty
().
getValue
(),
st2
.
getValue
(),
r2
.
intValue
(),
c2
.
doubleValue
(),
surfaceSize
.
doubleValue
()
/
100.0
);
secondRoundTask
.
setOnSucceeded
(
workerStateEvent
->
{
secondRoundSurfacesProperty
().
setValue
(
secondRoundTask
.
getValue
()
);
if
(
secondRoundTask
.
getValue
()
==
null
)
{
LOGGER
.
info
(
""
);
//TODO write right message
MainController
.
showError
(
new
SecondRoundConstructionException
()
);
}
}
);
LOGGER
.
info
(
GUI_MARKER
,
"Second round construction done."
);
secondRoundTask
.
start
();
}
public
void
runConstruction
()
{
LOGGER
.
debug
(
"Run construction"
);
if
(
firstRoundSurfacesProperty
().
getValue
()
==
null
)
{
firstRound
();
}
else
if
(
secondRoundSurfaces
.
getValue
()
==
null
)
{
secondRound
();
}
}
public
IntegerProperty
getBin
()
public
IntegerProperty
getBin
()
{
{
...
@@ -229,4 +173,9 @@ public class ConstructionModel< T extends RealType< T > & NativeType< T > >
...
@@ -229,4 +173,9 @@ public class ConstructionModel< T extends RealType< T > & NativeType< T > >
{
{
return
disableGUI
;
return
disableGUI
;
}
}
public
int
getSurfaceMax
()
{
return
(
int
)
(
input
.
get
().
dimension
(
0
)*
input
.
get
().
dimension
(
1
)/
(
bin
.
get
()
*
bin
.
get
()));
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment