Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 23 20:34
    tinevez commented #192
  • Sep 23 20:32
    tinevez labeled #232
  • Sep 23 20:32
    tinevez labeled #232
  • Sep 23 20:32
    tinevez opened #232
  • Sep 23 16:17

    hinerm on master

    Bump to next development cycle … (compare)

  • Sep 23 16:17

    hinerm on scijava-common-2.89.2

    [maven-release-plugin] prepare … (compare)

  • Sep 23 16:14
    hinerm closed #444
  • Sep 23 16:14

    hinerm on master

    ArrayToStringConverter: support… (compare)

  • Sep 23 14:21
    karlduderstadt commented #444
  • Sep 23 14:03
    karlduderstadt commented #444
  • Sep 23 14:03
    karlduderstadt commented #444
  • Sep 23 13:57
    karlduderstadt opened #444
  • Sep 22 22:44

    ctrueden on master

    POM: update parent to pom-scija… Happy New Year 2022 POM: use HTTPS for schema locat… and 2 more (compare)

  • Sep 22 22:44

    ctrueden on Stitching_-3.1.9

    [maven-release-plugin] prepare … (compare)

  • Sep 22 22:42

    ctrueden on Fiji_Developer-2.0.8

    [maven-release-plugin] prepare … (compare)

  • Sep 22 22:42

    ctrueden on master

    POM: update parent to pom-scija… Add missing license headers and… POM: fix forum.image.sc tag lin… and 1 more (compare)

  • Sep 22 22:39

    ctrueden on master

    POM: update parent to pom-scija… Happy New Year 2022 POM: use HTTPS for schema locat… and 2 more (compare)

  • Sep 22 22:39

    ctrueden on 3D_Viewer-4.0.4

    [maven-release-plugin] prepare … (compare)

  • Sep 22 15:51

    ctrueden on scijava-common-2.89.1

    [maven-release-plugin] prepare … (compare)

  • Sep 22 15:51

    ctrueden on master

    Update some hyperlinks, and use… Bump to next development cycle … (compare)

Stephan Preibisch
@StephanPreibisch
if you would close and open BDV it should update
check this code out
Stephan Preibisch
@StephanPreibisch
here we update registrations interactively
Nicolas Chiaruttini
@NicoKiaru
Thanks @StephanPreibisch ! And you're also using reflection: you call the non public SpimSource.loadTimepoints method through reflection
Christian Tischer
@tischi

Thanks @NicoKiaru & @StephanPreibisch !
It looks like that both of your codes you are calling a method of the Source that is wrapped by the TransformedSource, which is the object BDV is using to display the source. What I did initially was simply:

final TransformedSource transformedSource = ( TransformedSource ) source;
transformedSource.setFixedTransform( myTransform );
bdv.getBdvHandle().getViewerPanel().requestRepaint();

This updates the display of the TransformedSource in the BDV and is much simpler code. I think the difference is that the TransformedSource is something that only exists in BDV and is not talking back to the SpimData object that was initially put into BDV for display. My feeling is that if one just wants to add additional transforms to Sources and display those in BDV, using the TransformedSource.setFixedTransform() approach might be cleaner?! In fact, the only reason I now also want to modify the SpimData object is because I want to save a new xml with myTransform appearing as additional <affine>...<\affine> tags. What do you think?

Christian Tischer
@tischi
...what I need for our users is a solution that works consistently for both adding a ManualTransformation (by pressing T in BDV) and/or adding any kind of other transformation, e.g. as obtained by a phase-correlation algorithm. And they should play well together. E.g. a user might do a rough manual pre-alignment (using T) and then press, e.g., P to compute a fine phase-correlation alignment on top of the manual pre-alignment. I am a bit worried right now that the current ManualTransformation in bdv-core relies on the TransformedSource, while our solutions seem to rather work through SpimData, and thus things might become messy, but I might be wrong as I am still not fully grasping everything...
Nicolas Chiaruttini
@NicoKiaru
That's also what I understood @tischi. If you want to resave, I think it's better to go for the SpimData option. Extra advantage of using SpimData is that the volatile view is taken care of also. It may not be the case fot the TransformedSource ? An alternative : every time you want to save the SpimData, check the transform of the TransformedSource: if it's not identity, then push it to SpimData.
But you may end up with a long chain of transform if the user is doing many attempts.
Christian Tischer
@tischi
image.png
Christian Tischer
@tischi
I am confused :-) I applied the ViewRegistration in the SpimData and also applied your reflection trick, in above example applying a simple translation along the x-axis. The result in BDV is that the yellow box is shifted along the x-axis relative to the grey square (see screenshot). However the coordinates of the upper left corner of the image are still at x=0 and y=0 if you hover there with the mouse. If I would change the transformation via the TransformedSource.setFixTransform() this would be different: the coordinates of the image would actually be shifted. Can someone explain me the meaning of the gray square and why the coordinates do not change using the SpimData approach? (...for me, I think the coordinates really would need to change because I need to move around the relative location of multiple Sources in a physical coordinate system).
Curtis Rueden
@ctrueden
Is there a one-liner in ImgLib2 for copying an image's contents into another image, without using a lambda? I know about imglib/imglib2/pull/237 but that isn't merged. I know about LoopBuilder but that requires a lambda. I want to do this from Python and I'm concerned that writing the lambda will not be elegant and/or performant. My current approach is to use Ops (ij.op().run("copy.rai", result, rai)) but @haesleinhuepf says in imagej/pyimagej#46 that it is too slow and must be fixed immediately.
Christian Tischer
@tischi
@NicoKiaru and @StephanPreibisch ...the solution is that I have to call the loadTimepoint method for both the Source< ? > and the Source< ? extends <Volatile< ? >>. An alternative to twice calling the private loadTimepoint() method via reflection seems to be to simply use transformedSource.setFixedTransform( transform ). This also properly updates the BDV. I don't understand yet what the pros and cons are...
Nicolas Chiaruttini
@NicoKiaru
Ah indeed @tischi! Sorry I forgot about it, and that gave me some headache as well. ... but yeah it was in the first link I sent you.
Always if you want to work with SourceAndConverter, you need to null check the volatile source and apply identical operations on both the volatile and non volatile source...
Christian Tischer
@tischi
@NicoKiaru @bogovicj @tpietzsch I need to implement a BDV UI that enables to save a selected 3D region to a conventional voxel space image, e.g. to an ImagePlus. My plan was to combine the bounding box dialog (https://github.com/bigdataviewer/bigdataviewer-core/tree/master/src/main/java/bdv/tools/boundingbox) with the exporter code from BigWarp (https://github.com/saalfeldlab/bigwarp/blob/master/src/main/java/bigwarp/BigWarpRealExporter.java). I just wanted to double check that this is not already a functionality that exists somewhere. And also, since I feel this is generally useful, I wanted to ask where to put it (in case of doubt I was gonna put it here for now: https://github.com/tischi/bdv-utils/)
Stephan Preibisch
@StephanPreibisch
Hi, I do a very similar thing in the multiview-reconstruction/BigStitcher
Christian Tischer
@tischi
@StephanPreibisch thanks a lot for pointing this out!
John Bogovic
@bogovicj
@tischi , nice! Where you put it probably depends on the dependencies - I'm sure you'll need read/write stuff which probably means we won't want to add to bdv-core, so your bdv-utils seems like a good place (to me)
Christian Tischer
@tischi

Could someone please help me? I have a BDV with only one source shown, and, correctly, below function returns me a list with one index:

bdv.getBdvHandle().getViewerPanel().getState().getVisibleSourceIndices();

However, when I let the user select a bounding box using (from bdv-core)

new TransformedRealBoxSelectionDialog( ... ).getResult()

above command (bdv.getBdvHandle().getViewerPanel().getState().getVisibleSourceIndices();) returns me a list with two indices. My first guess is that the TransformedRealBoxSelectionDialog maybe does not properly "clean up" the temporary overlay that it generates? Or am I doing something wrong?

Christian Tischer
@tischi
...I think I figured it out. When I put an IJ.wait( 100 ); in-between it does show the correct number of sources. I think reason must be that the TransformedRealBoxSelectionDialog returns its results already before it cleans up. I'll try to fix it and submit a pull-request later.
Christian Tischer
@tischi
@tpietzsch ...I had a look, but it is a bit too involved for me to decide how to best handle this. I created an issue: bigdataviewer/bigdataviewer-core#63
Christian Tischer
@tischi
@bogovicj, @StephanPreibisch, @NicoKiaru just FYI (in case you find it useful), I am implementing code such that in BDV, with multiple sources open, you can press Ctrl+B upon which you can select two sources, then it will open BigWarp for you with those two sources, you can register them and then upon some other keyboard shortcut transfer the transformation back to BDV and close BigWarp. So, in a sense, this is kind of an advanced way of doing a manual transformation.
John Bogovic
@bogovicj
Cool!
Stephan Preibisch
@StephanPreibisch
Nice, would be great if you could send around a little example once it works, would love to see it :)
Christian Tischer
@tischi

@bogovicj , @StephanPreibisch Ok, it seems to work :-) In principle it is as easy as adding this dependency:

<groupId>de.embl.cba</groupId>
<artifactId>bdv-utils</artifactId>
<version>0.3.2</version>

and then adding below line of code to your code, given you have a bdvHandle object which has some sources opened.

BdvBehaviours.addAlignSourcesWithBigWarpBehaviour( bdvHandle, behaviours, "ctrl B" );

However, before this could work, @bogovicj would have to merge my latest PR :-)
I will also during the next days record a video and upload it somewhere.

Christian Tischer
@tischi
John Bogovic
@bogovicj
👍
Jean-Yves Tinevez
@tinevez
👌
Nicolas Chiaruttini
@NicoKiaru
Quick question : what's the current status of bdv-cache and Java with versions > 8 ? (cf thread : https://forum.image.sc/t/conversation-with-the-openjdk-developers-about-javafx-and-unsafe/21901/12)
@tpietzsch
Philipp Hanslovsky
@hanslovsky
@NicoKiaru imglib2-cache has been updated for Java > 8 (imglib/imglib2-cache#11). Is that what you mean by bdv-cache?
Curtis Rueden
@ctrueden
@NicoKiaru Did you try it? Were there problems?
Nicolas Chiaruttini
@NicoKiaru
@ctrueden @hanslovsky Thank you ! And there's no problem, no worry ;-) I just wanted to know because in my mind this was still the blocking point to change the java version in FIJI
Jan Eglinger
@imagejan
@NicoKiaru thanks for this nice video on Bigdataviewer-Scijava!
I noticed your utils for displaying AffineTransforms, did you also create some IO plugins (i.e. saving a row-packed copy of the matrix to a file)?
I'd love to see utilities like AffineTransformDisplay in a small separate repository, independent of BDV. Maybe we can make imglib2-realtransform-utils? Or imagej-realtransform for both UI and IO of RealTransform/AffineTransforms?
Nicolas Chiaruttini
@NicoKiaru
Thanks @imagejan ! And thanks for your post in the repository. Indeed there are some mixed things in this repository because I did not want to complexify too much the testing. I wrote two things to handle transforms : a display in order to reuse pre-existing transformations (ui built with EasySwingDisplayViewer, see forum thread). And I wrote a converter from String to AffineTransform3D -> the toString() method of AffineTransform3D can be easily reconverted into an AffineTransform3D object.
Nicolas Chiaruttini
@NicoKiaru

I'd love to see utilities like AffineTransformDisplay in a small separate repository, independent of BDV. Maybe we can make imglib2-realtransform-utils? Or imagej-realtransform for both UI and IO of RealTransform/AffineTransforms?

Completely agree. So far there are two issues in the way I deal with the display and reuse of "custom"Java objects: 1 - if they do not override toString in a nice way, their names are ugly (already discussed, but it's not a big priority). 2 - It does not always make sense to have one window per object (for instance for AffineTransforms) -> It would be better to have a window which holds a list of all the objects of a certain class. That's more of a scijava-common discussion.

I noticed your utils for displaying AffineTransforms, did you also create some IO plugins (i.e. saving a row-packed copy of the matrix to a file)?
Nicolas Chiaruttini
@NicoKiaru
Forgot your question, but the answer is no
Christian Tischer
@tischi
@bogovicj Is there a way to add the bigWarp version with my changes via maven?
John Bogovic
@bogovicj
@tischi add to fiji?
Nicolas Chiaruttini
@NicoKiaru
Is there some documentation or some example of sciava.ui.behaviour 'chaining' ? I've seen this word somewhere in the documentation but I do not really understand what's its purpose and how it's supposed to be done. I've understood the concept of inputmap/actionmap but I do not grasp the difference with ui scijava behaviour(s). Also, are triggered actions of behaviour registered by scijava eventService by any chance ? @tpietzsch @tischi @haesleinhuepf
Curtis Rueden
@ctrueden
@NicoKiaru Unfortunately, scijava-behaviour and the scijava-common stack (EventService and org.scijava.input package) are completely separate. :cry:
Tobias Pietzsch
@tpietzsch
@ctrueden let’s talk about this during hackathon?
@NicoKiaru I’m on my phone. I’ll explain chaining later...
Nicolas Chiaruttini
@NicoKiaru
Absolutely no rush. Thank you @tpietzsch and @ctrueden
Curtis Rueden
@ctrueden
@tpietzsch Sounds good. @NicoKiaru Bridging them is probably quite doable with a scijava component depending on both and firing the right events in response to behaviour events. I'd be interested to know how this would be useful for you.
Nicolas Chiaruttini
@NicoKiaru
@ctrueden We are discussing to do some tools for bigdataviewers with @tischi and @haesleinhuepf . I have something which works and which relies heavily on scijava commands and parameters bigdataviewer_scijava. @tischi and @haesleinhuepf are going more with scijava-behaviour, and for now it's more of an exploratory work. Since we want to join forces, I wanted to keep my scijava layer compatible with ui.behaviour; potentially by catching triggered behaviour. One idea could be to add an additional scijava actionmap which catch/and or duplicate triggered behaviours/events to the scijava EventService ?