Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigwarp 9.0.0 #163

Merged
merged 299 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
299 commits
Select commit Hold shift + click to select a range
acf977d
fix: serialization test
cmhulbert Sep 23, 2022
2e60e34
feat: move transform type to main options dialog
Sep 23, 2022
e3ea480
Merge branch 'masked-tps' of github.com:saalfeldlab/bigwarp into mask…
Sep 23, 2022
24a4402
WIP: no more warnings after keymap update
bogovicj Sep 28, 2022
a7487c8
WIP: start cleaning up actions
bogovicj Sep 29, 2022
c26efb6
wip: toward working appearance manager
bogovicj Sep 30, 2022
8d37d4a
wip: indicate that a source is transformed in src info overlay
Sep 30, 2022
efe3def
wip: fix current source triggers
Sep 30, 2022
ff354f6
wip: use new displacement field framework
Oct 7, 2022
38d4580
feat: use DisplacementFieldTransform
cmhulbert Oct 20, 2022
056537f
test: use same whitespace formatting as comparison test
cmhulbert Oct 25, 2022
3ef954f
feat: extract read/write from/to JsonObject for serialization
cmhulbert Oct 25, 2022
105a7e1
fix: try-with-resource for writing to file
cmhulbert Oct 25, 2022
027aa8e
feat: serialize landmarks
cmhulbert Oct 25, 2022
9284906
test: fix json comparison test; note a peculiarity
cmhulbert Oct 25, 2022
97bd0af
test: add landmark serialization test
cmhulbert Oct 25, 2022
142e5e1
feat!: migrate TransformWriterJson methods to static
cmhulbert Oct 26, 2022
67bb04c
feat: remove redundant transform serialization
cmhulbert Oct 26, 2022
e4cac0c
refactor: rename tps related fields
cmhulbert Oct 27, 2022
5ed1c07
refactor!: rename mask to maskInterpolation
cmhulbert Oct 27, 2022
45bc468
feat: serialize maskInterpolationType
cmhulbert Oct 27, 2022
39382f1
refactor: use api instead of reflection
cmhulbert Oct 27, 2022
d6facf1
test: add more json serialization tests
cmhulbert Oct 28, 2022
440f626
fix: start all default sources inactive
cmhulbert Oct 28, 2022
84cf1c5
fix: check autosaver null
cmhulbert Oct 28, 2022
55378ce
feat: default to json settings
cmhulbert Oct 28, 2022
aa1a3d4
test: stop autosaver when test is done
cmhulbert Oct 28, 2022
9f92721
Merge remote-tracking branch 'cmhulbert/jsonSettings' into masked-tps
Oct 28, 2022
3034bab
Merge remote-tracking branch 'origin/masked-tps'
Oct 28, 2022
fd49405
test: start test for url parsing
bogovicj Nov 3, 2022
0a2e112
test: skeleton of test for loading sources from urls
Nov 3, 2022
46b108a
BREAKING CHANGE: wip reworking of BigWarpData class
bogovicj Nov 4, 2022
20fdfe2
refactor: move BigWarpData to its own file
bogovicj Nov 4, 2022
046cf05
feat: start new init dialog
bogovicj Nov 7, 2022
aad71e1
feat: improving new init dialog
Nov 7, 2022
b4b4865
BREAKING CHANGE: toward starting bigwarp without sources
bogovicj Nov 8, 2022
a0396ba
test: ignore generated files
cmhulbert Nov 8, 2022
1439a76
refactor: source serialization adapter
cmhulbert Nov 8, 2022
fcc62ae
feat: add source from url
cmhulbert Nov 8, 2022
1983706
feat: load source from N5Reader
cmhulbert Nov 8, 2022
a364f91
feat: store url from source
cmhulbert Nov 8, 2022
89bc3b0
refactor: use deprecated `getState()`
cmhulbert Nov 8, 2022
0fc8a7f
test,refactor: add sourceSerializationTest for when supported.
cmhulbert Nov 8, 2022
708babc
test: add source serializer test
cmhulbert Nov 8, 2022
f791a5c
test: expect default sources to be inactive
cmhulbert Nov 8, 2022
ff9477a
test: initial source from url tests
cmhulbert Nov 8, 2022
6e3c742
feat/refactor: add InvertibleWrapped2DTransformAs3D
bogovicj Nov 8, 2022
b4c878a
refactor add Wrapped2DTransformAs3D
bogovicj Nov 8, 2022
13e92b3
feat: add BigWarpData helper methods
Nov 8, 2022
48ca5fa
test: add a test script for transformed sources
Nov 8, 2022
de6f414
Merge branch 'sourceRefactor' into url
bogovicj Nov 8, 2022
f114367
chore: bump jitk-tps, rm duplicate n5-imglib2 declaration
bogovicj Nov 9, 2022
f5c2278
refactor: tests after BigWarpData change
bogovicj Nov 9, 2022
d4b8285
feat: reworking source grouping
bogovicj Nov 9, 2022
37a23ec
feat: init dialog cleanup, toward adding transformations
bogovicj Nov 9, 2022
a4456ae
feat: partially functional init dialog
bogovicj Nov 9, 2022
3c65e91
ui reworking
bogovicj Nov 15, 2022
a73c90b
wip: working browse buttons
Nov 15, 2022
c0a2d42
feat: toward macro recordability and an imagej2 command
bogovicj Nov 15, 2022
08368d1
add logback config
bogovicj Nov 16, 2022
fe36855
Merge branch 'ijCmd' into url
bogovicj Nov 16, 2022
3f12f6e
feat: add files
cmhulbert Nov 16, 2022
c3ebd53
style: misc
cmhulbert Nov 16, 2022
80d28ad
feat!: remove Brightness Dialog
cmhulbert Nov 16, 2022
9192f99
feat: create source from uri
cmhulbert Nov 16, 2022
c2f106e
feat!: separate create and add sources
cmhulbert Nov 16, 2022
53adc60
feat!: generic typics for loading sources
cmhulbert Nov 16, 2022
7e0e878
feat: internal add/remove source logic
cmhulbert Nov 16, 2022
f132377
feat: add default source by static id
cmhulbert Nov 16, 2022
7ad539a
feat: constructor without unused window title, deprecate old
cmhulbert Nov 16, 2022
0eeac89
feat!: aggregate SourceInfo
cmhulbert Nov 16, 2022
62e3106
feat: overwrite existing sources flag for deserialization
cmhulbert Nov 16, 2022
da8b2f0
feat: setupAssignemnts and converterSetups as objects, not array
cmhulbert Nov 16, 2022
7deca4d
feat: synchronize setupAssignments
cmhulbert Nov 16, 2022
e3c96fa
refactor!: migrate moving/target flag logic
cmhulbert Nov 16, 2022
2a43d8c
feat: ensure groups align after deserialization
cmhulbert Nov 16, 2022
c13957d
fix: check if mask is null before serialize
cmhulbert Nov 16, 2022
53c1f3c
fix: don't enforce 2 initial sources
cmhulbert Nov 16, 2022
d86cd40
fix: grab backing field, instead of copy
cmhulbert Nov 16, 2022
fc92fd2
fix: store id value, don't reference
cmhulbert Nov 16, 2022
5790c70
reactor(test): move to BigWarpTestUtils
cmhulbert Nov 16, 2022
b9837f8
feat(test): update tests for source serialization and sourceInfo/movi…
cmhulbert Nov 16, 2022
7633ecb
fix(test): new expected settings files
cmhulbert Nov 16, 2022
cf586e5
wip init dialog progress
bogovicj Nov 16, 2022
f917cd8
Merge branch 'url' of github.com:saalfeldlab/bigwarp into url
bogovicj Nov 16, 2022
d700b93
fix: BigWarpInitDialog works with SourceInfo
bogovicj Nov 16, 2022
3cba063
feat!: use transforms stored in SourceInfo
bogovicj Nov 16, 2022
f20ef0b
better BigWarpCommand example
bogovicj Nov 16, 2022
f36ffe9
remove color settings field from BigWarpData
bogovicj Nov 17, 2022
c9a7cd3
feat: don't add channel num if only 1 channel
cmhulbert Nov 17, 2022
733dd32
feat(test): method to generate ImagePlus
cmhulbert Nov 17, 2022
c3b03d6
feat(test): more source deserialization tests
cmhulbert Nov 17, 2022
1c907a7
refactor: remove unnecessary getOrDefault; Id always new, so don't pl…
cmhulbert Nov 17, 2022
2c262ce
feat(test): change channel numbering behavior
cmhulbert Nov 17, 2022
38d3ae5
feat: set name by dataset
cmhulbert Nov 17, 2022
adcaebe
fix: get title from uri correctly
cmhulbert Nov 17, 2022
db8bc22
feat(test): add serialization tests for n5/xml/imagej
cmhulbert Nov 17, 2022
2083549
feat: support calling `initialize` multiple times and during deserial…
cmhulbert Nov 17, 2022
9a7925b
feat: bigwarptransform flag to request 2d transforms not wrapped as 3d
bogovicj Nov 17, 2022
5d286f6
Merge remote-tracking branch 'origin/url' into dfield-dev
bogovicj Nov 17, 2022
38591da
fix: remove NgffTransformations dependencies
bogovicj Nov 17, 2022
2fc3f47
feat: add save/load project menu options
bogovicj Nov 20, 2022
0161ab7
feat: add support to open IJ2 Datasets
bogovicj Nov 21, 2022
f0563b2
chore: stop using deprecated constructor
bogovicj Nov 21, 2022
f0947a2
Merge remote-tracking branch 'origin/actions' into dev
bogovicj Nov 21, 2022
f2c5eaa
fix: allow undo / redo in landmark mode
bogovicj Nov 21, 2022
b396576
fix: actions viewer plane alignment and landmark activation
bogovicj Nov 26, 2022
4623f27
fix: synchronization issue during drags
bogovicj Nov 29, 2022
9f53e5f
feat: (wip) toward macro recordability
bogovicj Nov 29, 2022
d57203f
feat: more wip work toward macro recording
bogovicj Nov 29, 2022
d730e9f
feat: working macro recording
bogovicj Nov 29, 2022
ef85e36
fix: attempt to prevent initial useless recorded command
bogovicj Nov 30, 2022
09cc008
fix: make BigWarpInitDialog string fields editable in the table
bogovicj Nov 30, 2022
4a6b664
fix: add imagej scheme for image names
bogovicj Nov 30, 2022
c80cbde
feat: toward improving settings loading on empty bigwarp
bogovicj Nov 30, 2022
85e2e10
Merge remote-tracking branch 'origin/url' into dfield-dev
bogovicj Nov 30, 2022
3004763
feat: working transform loading from url
bogovicj Nov 30, 2022
8ecd8da
feat: add static method to load landmarks
bogovicj Nov 30, 2022
0174eba
feat: more methods for imglib2 transforms from mpicbg models
bogovicj Nov 30, 2022
9d9d218
feat: prelim plugin for exporting linear transformations
bogovicj Nov 30, 2022
c263dba
feat(test): add main for duplicating #158
cmhulbert Dec 1, 2022
33b699b
chore: imglib-realtransform-4.0.1
bogovicj Dec 3, 2022
54e073b
feat: implement export of flattened dfield
bogovicj Dec 3, 2022
a29d4bd
feat: add FieldOfViewPanel ui element
bogovicj Dec 5, 2022
71edcbe
feat: new dialog for displacement field export mostly functional
bogovicj Dec 6, 2022
b9d9276
feat: functional deformation field plugin
bogovicj Dec 7, 2022
5936741
fix: add transform mask source, and setup when toggled.
bogovicj Dec 7, 2022
6ea1577
fix: better intervals for warp vis sources
bogovicj Dec 7, 2022
b768826
fix: dfield export from bw instance when using mask
bogovicj Dec 7, 2022
fcc5cdc
fix: isMoving setting for initial ImagePlus
bogovicj Dec 7, 2022
916d856
fix: initial viewer grouping and transform
bogovicj Dec 8, 2022
efc44c1
fix: BigWarpInitDialog uses thread count from ImageJ
bogovicj Dec 8, 2022
6fa7611
fix: depend on n5-imglib2-5.0.0 (ngff)
bogovicj Dec 8, 2022
2be9c93
feat: loading / saving projects suggest better file names
bogovicj Dec 19, 2022
ea6cb9a
fix: project loading
bogovicj Dec 19, 2022
c520c3e
feat: set colorSettings from SourceInfo
cmhulbert Dec 20, 2022
ec4260a
fix: properly set colorSettings for ImagePlus sources
cmhulbert Dec 20, 2022
d6d43dd
fix: avoid race condition when loading converter setup settings
cmhulbert Dec 20, 2022
0b2ad3b
feat(test): repeat now supported
cmhulbert Dec 20, 2022
398b8d4
fix(test): add necessary test file
cmhulbert Dec 20, 2022
50cff50
fix: intermittent deadlock on startup
bogovicj Dec 20, 2022
b334662
Merge branch 'url' of github.com:saalfeldlab/bigwarp into url
bogovicj Dec 20, 2022
e7e07ba
fix: don't override landmarks after loading settings
cmhulbert Dec 20, 2022
7c172f0
fix: don't set displayRange randomly
cmhulbert Dec 20, 2022
be148f2
refactor: rename and remove println
cmhulbert Dec 20, 2022
5338a1d
fix: init dialog loads images fromn project when present
bogovicj Dec 20, 2022
fedbb11
fix: add mask source correctly, display overlay initially
bogovicj Dec 21, 2022
c32305f
Merge branch 'dfield-dev' of github.com:saalfeldlab/bigwarp into dfie…
bogovicj Dec 21, 2022
d31356b
Merge remote-tracking branch 'origin/url' into dfield-dev
bogovicj Dec 21, 2022
20287f4
feat: toward exporting inverse displacement field
bogovicj Dec 22, 2022
df298bc
fix(test): missing .zgroup in test zarr root
cmhulbert Dec 22, 2022
a62876e
feat: utilize N5Url instead of an independent implementation
cmhulbert Dec 22, 2022
1a6cf55
feat: toward exporting inverse displacement fields
bogovicj Dec 22, 2022
e5f1da7
fix: fov panel unit label
bogovicj Dec 23, 2022
761fec9
feat: correct inverse + ignoreAffine behavior for displacement field …
bogovicj Jan 4, 2023
ecfd63c
fix: add mask source to sourceInfos (avoids NPE)
bogovicj Jan 9, 2023
b1df58c
feat: change BigWarp dimensionality during runtime
cmhulbert Jan 9, 2023
725e6de
feat: improvements to warp visualization sources
bogovicj Jan 10, 2023
0895ed7
fix: retain correct active sources after synchronize
cmhulbert Jan 10, 2023
ee87ef1
feat: new ltm convenience add method
bogovicj Jan 11, 2023
1dcf3e2
feat: methods for decomposing 2d affine transforms
bogovicj Jan 11, 2023
183e9b5
feat: correct masked transform behavior for 2d
bogovicj Jan 11, 2023
4043d91
fix: SimilarityTransformInterpolationExample
bogovicj Jan 13, 2023
918f59f
feat: start of slicer-style dfield format
bogovicj Feb 8, 2023
112448a
Merge branch 'dfield-dev' of github.com:saalfeldlab/bigwarp into dfie…
bogovicj Feb 8, 2023
4de8166
fix: toward better mask behavior in 2d
bogovicj Feb 21, 2023
7160a51
fix: format slicer dfield as xyz3
bogovicj Feb 23, 2023
de713a9
Merge remote-tracking branch 'origin/url' into dfield-dev
bogovicj Feb 23, 2023
b63047c
fix: FovPanel min
bogovicj Apr 4, 2023
a792765
fix: dfield export error checking
bogovicj Apr 4, 2023
4db09ed
fix: wip dfield export slicer format fixing
bogovicj Apr 4, 2023
f341530
Merge branch 'master' into dfield-dev
bogovicj Aug 17, 2023
caa50b2
update to use new ngff classes in n5-universe
bogovicj Sep 6, 2023
41e7ba2
feat: import transform mask from file
bogovicj Sep 6, 2023
076759a
fix: BigWarpCommand uses DatasetService
bogovicj Sep 7, 2023
0f258c9
fix: BigWarpCommand enable passing of landmarks
bogovicj Sep 7, 2023
9ab596d
fix: changeDimensionality
bogovicj Sep 19, 2023
ed9f05a
fix: loading 2D Datasets
bogovicj Sep 19, 2023
89d4ece
feat: toward setting intensity range for imported mask
bogovicj Sep 19, 2023
445117a
fix: load 2d landmarks correctly on project loading
bogovicj Sep 19, 2023
74f3cf3
chore: some code style and clean up
bogovicj Sep 20, 2023
7e6e845
feat: can now (de)serialize mask or remove mask
bogovicj Sep 20, 2023
9687150
fix: 2d viewer transform bug
bogovicj Sep 25, 2023
06d2600
fix: behavior when removing transform masks
bogovicj Sep 25, 2023
0ac447e
fix: EDT Exception when loading project
bogovicj Sep 25, 2023
27ae9a3
fix: transform mask overlay rendering in 2d
bogovicj Sep 25, 2023
067685c
fix: json export of unspecified landmarks (infs)
bogovicj Sep 25, 2023
074bbd5
chore: LandmarkTableModel code style
bogovicj Sep 25, 2023
1041641
fix: NPE in NgffTransformations addCoordinateTransformations
bogovicj Sep 25, 2023
236e42e
feat: add detect NgffTransformation
bogovicj Sep 25, 2023
814169a
feat: toward detect and auto-completing transform uri in bw dialog
bogovicj Sep 25, 2023
d5f2398
feat: transform export dialog changes when exporting an affine
bogovicj Sep 27, 2023
ab49809
chore: cleaning
bogovicj Sep 27, 2023
e4e5ad5
fix/feat: dfield export of 2d masked transformations
bogovicj Sep 27, 2023
c0cfff5
fix: deserialize transformation type
bogovicj Sep 28, 2023
01da73b
feat: serialize source transformations
bogovicj Sep 28, 2023
4207ef3
feat!: change BigWarpSourceTableModel.setTransform
bogovicj Sep 28, 2023
3334c4d
fix: transform serialization, especially linear
bogovicj Sep 28, 2023
4b8f0ad
chore: more cleaning
bogovicj Sep 28, 2023
c38356b
feat: greatly improve H5/N5/Zarr import of transforms from dialog
bogovicj Sep 28, 2023
45b7bc7
chore: update n5 versions
bogovicj Sep 29, 2023
10d29aa
fix: BigWarpInit be more permissive with n5 source uris
bogovicj Sep 29, 2023
6e20014
test/fix: expected values for serialization tests
bogovicj Sep 29, 2023
15c4f82
fix: whoops didn't need BigWarpInit change
bogovicj Sep 29, 2023
1dbbf2b
fix: bw dialog DatasetService issues
bogovicj Sep 29, 2023
a766b06
fix: EDT exception on loading
bogovicj Sep 29, 2023
5159fa6
fix: selection of transform from n5 containers
bogovicj Oct 2, 2023
c9f4cd3
feat: add WarpedSource.getOriginalName
bogovicj Oct 2, 2023
fd3e5b7
fix: input and output names form exported transformations
bogovicj Oct 2, 2023
802c257
fix: target image resolution as default for dfield export
bogovicj Oct 2, 2023
4400199
fix: catch errors with empty landmark table
bogovicj Oct 2, 2023
683d484
allow undo/redo from landmark mode
bogovicj Oct 2, 2023
66800cc
fix: AOOBE when setting resolution of 2D fov panel
bogovicj Oct 2, 2023
8981117
fix: intermittent exception on startup
bogovicj Oct 2, 2023
5e9dfbf
fix: BigWarpInit.runBigWarp with arguments serializes imported transf…
bogovicj Oct 2, 2023
dadaf45
chore: less logging
bogovicj Oct 2, 2023
b0dacfb
fix: behavior of fov panel
bogovicj Oct 3, 2023
5d713b3
fix: (again) intermittent AIOOB on startup
bogovicj Oct 3, 2023
ea7e412
chore: clean and code style
bogovicj Oct 3, 2023
173a568
fix: undo EDT change to save. other issues arose
bogovicj Oct 3, 2023
9319848
fix: interp transform NPE when lambda null
bogovicj Oct 3, 2023
19aca62
fix: activation of warp vis sources
bogovicj Oct 3, 2023
4825a24
fix: suppress error
bogovicj Oct 3, 2023
7bc2caa
fix: export inverse affines
bogovicj Oct 3, 2023
d24d022
fix: export of split affine-dfield
bogovicj Oct 3, 2023
5755fbe
fix: export of translation transforms
bogovicj Oct 5, 2023
c69ec6d
fix: export of sequence transforms
bogovicj Oct 5, 2023
32da0db
fix: exporting image with moving(warped) fov with no transform
bogovicj Oct 5, 2023
37c7447
fix(ui): remove "slicer"-style transform export option from ui
bogovicj Oct 5, 2023
a56e48e
fix: warped source bounding box estimation
bogovicj Oct 5, 2023
2de1723
chore: n5 deps
bogovicj Oct 5, 2023
0cab41e
chore: bump imglib2
bogovicj Oct 5, 2023
ab4d0c8
chore: cleanup, move main methods to test classes
bogovicj Oct 5, 2023
08d27b2
Merge branch 'dfield-dev' into dev
bogovicj Oct 5, 2023
7fc04c4
fix: n5 selection dialog now works when called repeatedly
bogovicj Oct 6, 2023
140a4f2
fix: warped source back to orig impl
bogovicj Oct 6, 2023
9010c47
fix: open n5 sources as volatile
bogovicj Oct 6, 2023
b8e0ee6
fix: load/save bw project menu options
bogovicj Oct 6, 2023
69d97e3
refactor: rename "warp" to "jump" to landmarks
bogovicj Oct 6, 2023
a0c3496
chore: bump major version
bogovicj Oct 6, 2023
aa3fe4e
chore/refactor: bump n5-universe 1.2.0
bogovicj Oct 6, 2023
d01b389
fix: jump-actions now call appropriate method in bigwarp class
bogovicj Oct 6, 2023
8c52686
style: bwViewerPanel cleanup
bogovicj Oct 6, 2023
dcaeab9
chore(ci): use xvfb
bogovicj Oct 9, 2023
1a2d63b
chore(ci): gh action builds
bogovicj Oct 9, 2023
536cfda
chore(test): mvn test profiles
bogovicj Oct 9, 2023
a4a8075
fix(test): url and dfield tests
bogovicj Oct 9, 2023
0cf39d5
test: try to avoid headless exception in UriParseTest
bogovicj Oct 9, 2023
07fa755
feat: bwViewerFrame add getTriggerBindings
bogovicj Oct 9, 2023
76f766b
doc: javadoc corrections and updates
bogovicj Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ hs_err_pid*
/bin/
/target/

# ignore files generated during test
/src/test/resources/bigwarp/url/imgDir3d/img3d0000.tif
/src/test/resources/bigwarp/url/imgDir3d/img3d0001.tif
/src/test/resources/bigwarp/url/imgDir3d/img3d0002.tif
/src/test/resources/bigwarp/url/imgDir3d/img3d0003.tif
/src/test/resources/bigwarp/url/img.tif
/src/test/resources/bigwarp/url/img2d.png
83 changes: 77 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>sc.fiji</groupId>
<artifactId>bigwarp_fiji</artifactId>
<version>8.0.1-SNAPSHOT</version>
<version>9.0.0-SNAPSHOT</version>

<name>BigWarp plugin for Fiji</name>
<description>A tool for manual pointwise deformable registration using bigdataviewer.</description>
Expand Down Expand Up @@ -118,16 +118,25 @@
<license.projectName>BigWarp plugin for Fiji.</license.projectName>
<license.excludes>**/resources/*.xml</license.excludes>

<imglib2.version>6.2.0</imglib2.version>
<imglib2-realtransform.version>4.0.1</imglib2-realtransform.version>

<jcommander.version>1.48</jcommander.version>
<alphanumeric-comparator.version>1.4.1</alphanumeric-comparator.version>
<jitk-tps.version>3.0.3</jitk-tps.version>

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>

<n5.version>3.0.0</n5.version>
<n5-ij.version>3.2.4</n5-ij.version>
<n5.version>3.0.2</n5.version>
<n5-ij.version>3.2.6</n5-ij.version>
<n5-hdf5.version>2.0.1</n5-hdf5.version>
<n5-aws-s3.version>4.0.1</n5-aws-s3.version>
<n5-google-cloud.version>4.0.0</n5-google-cloud.version>
<n5-imglib2.version>7.0.0</n5-imglib2.version>
<n5-universe.version>1.0.1</n5-universe.version>
<n5-universe.version>1.2.0</n5-universe.version>
<n5-viewer_fiji.version>5.3.1</n5-viewer_fiji.version>
<n5-zarr.version>1.0.1</n5-zarr.version>
<bigdataviewer-core.version>10.4.8</bigdataviewer-core.version>

</properties>
Expand All @@ -145,6 +154,10 @@
<groupId>net.imagej</groupId>
<artifactId>ij</artifactId>
</dependency>
<dependency>
<groupId>net.imagej</groupId>
<artifactId>imagej</artifactId>
</dependency>

<!-- ImgLib2 dependencies -->
<dependency>
Expand Down Expand Up @@ -236,13 +249,27 @@
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-imglib2</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-aws-s3</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-google-cloud</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-viewer_fiji</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-zarr</artifactId>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-universe</artifactId>
<version>${n5-universe.version}</version>
</dependency>


<!-- OME dependencies -->
<dependency>
<groupId>ome</groupId>
Expand Down Expand Up @@ -306,12 +333,56 @@
<artifactId>alphanumeric-comparator</artifactId>
<version>${alphanumeric-comparator.version}</version>
</dependency>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
</dependency>

<!-- Test scope dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.5</version>
</dependency>

</dependencies>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/SerializationTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>uiTests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
184 changes: 184 additions & 0 deletions src/main/java/bdv/gui/AutosaveOptionsPanel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
package bdv.gui;

import bigwarp.BigWarp;
import bigwarp.BigWarpAutoSaver;
import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.io.File;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.JSpinner.DefaultEditor;
import javax.swing.JTextField;
import javax.swing.SpinnerNumberModel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

public class AutosaveOptionsPanel extends JPanel
{
private static final long serialVersionUID = 2449704984531905538L;

private final BigWarp< ? > bw;

private final SpinnerNumberModel savePeriodModel;
private final JSpinner autoSavePeriodSpinner;
private final JCheckBox doAutoSaveBox;
private final JTextField autoSaveFolderText;

private int lastAutoSaveFreq = 5;
private boolean updating = false;

public AutosaveOptionsPanel( final BigWarp< ? > bw, final Container content )
{
super( new GridBagLayout() );
this.bw = bw;

doAutoSaveBox = new JCheckBox( "Auto-save landmarks" );

final JLabel autoSavePeriodLabel = new JLabel( "Frequency (minutes)" );
autoSavePeriodSpinner = new JSpinner();
savePeriodModel = new SpinnerNumberModel( 0, 0, 0, 1 );
getAutoSavePeriodSpinner().setModel( savePeriodModel );
((DefaultEditor)getAutoSavePeriodSpinner().getEditor()).getTextField().setEditable( false );
((DefaultEditor)getAutoSavePeriodSpinner().getEditor()).getTextField().setEnabled( false );
getAutoSavePeriodSpinner().addChangeListener( new ChangeListener()
{
@Override
public void stateChanged( ChangeEvent e )
{
if ( getDoAutoSaveBox().isSelected() && !updating )
{
long periodMillis = ((Integer) savePeriodModel.getValue()).longValue() * 60000;
BigWarpAutoSaver autoSaver = bw.getAutoSaver();
if ( autoSaver != null )
autoSaver.stop();

bw.setAutoSaver( new BigWarpAutoSaver( bw, periodMillis ));
}
}
} );

getDoAutoSaveBox().addItemListener( new ItemListener()
{
@Override
public void itemStateChanged( ItemEvent e )
{
bw.stopAutosave();
if ( getDoAutoSaveBox().isSelected() )
{
updating = true;
((DefaultEditor)getAutoSavePeriodSpinner().getEditor()).getTextField().setEditable( true );
((DefaultEditor)getAutoSavePeriodSpinner().getEditor()).getTextField().setEnabled( true );
savePeriodModel.setMinimum( 1 );
savePeriodModel.setMaximum( 5000 );
savePeriodModel.setValue( lastAutoSaveFreq );

long periodMillis = ((Integer) savePeriodModel.getValue()).longValue() * 60000;
bw.setAutoSaver( new BigWarpAutoSaver( bw, periodMillis ));
updating = false;
}
else
{
lastAutoSaveFreq = ((Integer) savePeriodModel.getValue());
savePeriodModel.setMinimum( 0 );
savePeriodModel.setMaximum( 0 );
savePeriodModel.setValue( 0 );
((DefaultEditor)getAutoSavePeriodSpinner().getEditor()).getTextField().setEditable( false );
((DefaultEditor)getAutoSavePeriodSpinner().getEditor()).getTextField().setEnabled( false );
}
}
} );

final JLabel destDirLabel = new JLabel( "Directory" );
final File startingFolder = bw.getBigwarpSettingsFolder();
autoSaveFolderText = new JTextField();
getAutoSaveFolderText().setText( startingFolder.getAbsolutePath() );

final JButton browseBtn = new JButton( "Browse" );
browseBtn.addActionListener( e -> {

final JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY );
fileChooser.setCurrentDirectory( startingFolder );

final int ret = fileChooser.showOpenDialog( content );
if ( ret == JFileChooser.APPROVE_OPTION )
{
final File folder = fileChooser.getSelectedFile();
getAutoSaveFolderText().setText( folder.getAbsolutePath() );
bw.getAutoSaver().setAutosaveFolder( folder );
}
} );

final GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 1;
gbc.gridy = 0;
gbc.gridwidth = 1;
gbc.gridheight = 1;
gbc.weightx = 1.0;
gbc.anchor = GridBagConstraints.LINE_END;
gbc.fill = GridBagConstraints.NONE;
gbc.insets = new Insets( 5, 5, 5, 5 );

add( getDoAutoSaveBox(), gbc );

gbc.weightx = 1.0;
gbc.gridx = 2;
gbc.gridwidth = 1;
gbc.gridy = 0;
gbc.anchor = GridBagConstraints.LINE_END;
add( autoSavePeriodLabel, gbc );

gbc.gridx = 3;
gbc.gridwidth = 1;
gbc.weightx = 1.0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.fill = GridBagConstraints.HORIZONTAL;
add( getAutoSavePeriodSpinner(), gbc );

gbc.gridy = 2;
gbc.gridx = 0;
gbc.gridwidth = 1;
gbc.weightx = 0.0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.fill = GridBagConstraints.NONE;
add( destDirLabel, gbc );

gbc.gridy = 2;
gbc.gridx = 1;
gbc.gridwidth = 3;
gbc.weightx = 1.0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.fill = GridBagConstraints.HORIZONTAL;
add( getAutoSaveFolderText(), gbc );

gbc.gridx = 4;
gbc.weightx = 0.0;
gbc.anchor = GridBagConstraints.LINE_END;
gbc.fill = GridBagConstraints.NONE;
add( browseBtn, gbc );
}

public JSpinner getAutoSavePeriodSpinner()
{
return autoSavePeriodSpinner;
}

public JCheckBox getDoAutoSaveBox()
{
return doAutoSaveBox;
}

public JTextField getAutoSaveFolderText()
{
return autoSaveFolderText;
}

}
Loading
Loading