Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 17 15:41
    tinevez synchronize #162
  • May 17 15:41

    tinevez on branch-graph-v2

    Fix javadoc errors. (compare)

  • May 17 15:35
    tinevez edited #162
  • May 17 15:33
    tinevez synchronize #162
  • May 17 15:33

    tinevez on branch-graph-v2

    Remove faulty JUnit test. It w… (compare)

  • May 17 15:23
    tinevez opened #162
  • May 17 15:15

    tinevez on branch-graph-v2

    Don't send navigation events to… (compare)

  • May 16 21:05
    ctrueden commented #317
  • May 16 21:04
    ctrueden commented #317
  • May 16 21:03
    ctrueden commented #317
  • May 16 20:54
    ctrueden commented #391
  • May 16 20:08
    imagejan commented #391
  • May 16 13:53

    tinevez on branch-graph-v2-feature-colors

    (compare)

  • May 16 07:00
    tischi commented #391
  • May 15 19:09

    tinevez on branch-graph-v2

    Have a set of basic feature per… (compare)

  • May 15 11:14
    tinevez closed #161
  • May 15 11:02

    tinevez on branch-graph-v2

    Regen the branch-graph before f… (compare)

  • May 14 18:09

    tinevez on branch-graph-v2

    Don't try to force the size of … Fix a bug in branch trackscheme… Merge branch 'branch-graph-v2' … (compare)

  • May 14 14:40
    tinevez closed #156
  • May 14 14:40
    tinevez commented #156
Tobias Pietzsch
@tpietzsch
It is a hint to the asynchronous loading infrastructure in the background: Data that might be enqueued for loading is not immediately needed anymore, and new requests should be prioritized. For example when moving to timepoint 2, then image tiles that were required to render timepoint 1 and are still enqueued for loading can be discarded (or bumped to a lower priority)
In general nothing bad happens if this hint is simply ignored.
SharedQueue is a CacheControl
Slightly simplified, it is basically a priority queue for image block requests and a number of threads that service requests from the queue.
Several VolatileImages can share the same SharedQueue (hence the name)
Tobias Pietzsch
@tpietzsch
The idea is that block requests from these images (which might be visible at the same time) are sorted into the same priority queue and serviced by the same loader threads. (instead of having a group of threads for each image that fight for resources and are basically prioritized the same)
Philipp Hanslovsky
@hanslovsky
:plus1:
Nicolas Chiaruttini
@NicoKiaru
Ok, thanks @tpietzsch this makes a lot of sense! So let's say I need to open hundreds ( ~200) of sources at the same time. Currently I create a SharedQueue(1) for each source. I assume it's probably more efficient to create a single SharedQueue(x), indeed shared for all sources ? What value of x would be appropriate ? Should x be equal to the number of cpu cores ? Also, would it diminish the risk of getting a Java Heap Space issue ?
Stephan Saalfeld
@axtimwalde
Yes, a single SharedQueue would be better, however, 200 sources could become inefficient? If that is the case, I would implement an intermediate cached source that combines the 200 sources (you can do this with a simple Converter over a Composite). But that means that you would lose the sliders and stuff...
Nicolas Chiaruttini
@NicoKiaru
Thanks @axtimwalde do you have an example somewhere ? this looks super interesting and I think that there was a discussion on gitter about this recently, but I cannot find it
Ellen TA Dobson
@etadobson
Is there a way to use LoopBuilder (or something similar) to loop multiple things while knowing their position?
Curtis Rueden
@ctrueden
@etarena @maarzt @tpietzsch Shazam: imglib/imglib2#273
Ellen TA Dobson
@etadobson
:thumbsup:
Jan Eglinger
@imagejan
:+1: that leads me to another question: is there something like an IterableRegion that permits localization of each iterated pixel? I.e. an Iterable<RealLocalizable> instead of Iterable<Void>, but still iterating only true pixels of the mask?
I guess there is: PositionableIterableRegion; but is there a utility function similar to Regions.iterable(RAI<B>) to retrieve those?
Curtis Rueden
@ctrueden
@imagejan The javadoc for that class says "We put interfaces RandomAccessibleInterval<BooleanType>, IterableRegion<BooleanType>, PositionableIterableRegion<BooleanType> into this sequence such that the Regions methods that "add capabilities" (being iterable, positionable) can have appropriate result types."
This suggests to me that @tpietzsch intended for there to be more Regions methods exposing it. But I don't see them.
In this case though, we just want a LocalizableIterableRegion. Not Positionable. Right? I think the latter is more complex.
Jan Eglinger
@imagejan
Oh, right, we'd want a LocalizableIterableRegion, sure.
Curtis Rueden
@ctrueden
Hmm. I think we're conflating iterables vs iterator/accessors here.
IterableRegion does have a localizingCursor method.
That is: the IterableRegion (similar to RAI and II) does not have a position. But it can give you accessors that do.
Jan Eglinger
@imagejan
Oh, I see. I guess I wasn't getting the concept. Thanks a lot!
Curtis Rueden
@ctrueden
Note that IterableRegion<T extends BooleanType<T>> extends IterableInterval<Void>. So... the cursor() method returns Cursor<Void>. So that you can iterate the positions, but you can't access sample values because there is nothing to access (the backing region is just true at those spots, always).
Jan Eglinger
@imagejan
Yeah, I'd need a Sampler otherwise, right?
Curtis Rueden
@ctrueden
As in: you want to bind a mask to an image and iterate the samples that are not masked out. Right? While knowing their positions?
Let's see...
Right now, you do:
Jan Eglinger
@imagejan
Actually, in my case, having the positions would be enough, no need to sample the values. So I'm fine with localizingCursor I guess.
Curtis Rueden
@ctrueden
RealMaskRealInterval myMask = ...;
RandomAccessible<T> myImage = ...;
IterableInterval<T> myMaskedImage = Regions.sample(myMask, myImage);
Cursor<T> c = myMaskedImage.localizingCursor();
long[] pos = new long[c.numDimensions()];
while (c.hasNext()) {
  T value = c.next();
  c.localize(pos);
  // and now we do something with the position and sample value
}
However, there are some limitations:
  1. myMask has to be a RealMaskRealInterval, not a RealMask. This is unfortunate. We could add a Regions.sample(RealMask, RandomAccessibleInterval) that creates a RealMaskRealInterval matching the bounds of the given RAI. I think?
  2. This myMaskedImage cannot be used with LoopBuilder because LoopBuilder only supports RAI images, not II images. So we have to use this clunkier cursor code, rather than a nice lambda. ¯\_(ツ)_/¯
Jan Eglinger
@imagejan
Thanks for the explanations!
Curtis Rueden
@ctrueden
It's partly explanations, and partly me figuring things out and thinking about to make it better.
Do you agree with (1) that we could have a better utility method here?
Because I think the most common thing is that you have a RealMask (not necessarily a RealMaskRealInterval) and a RAI and you want to combine them.
Jan Eglinger
@imagejan
Yes, agreed.
Curtis Rueden
@ctrueden
I feel dumb, but I'm not finding the mechanism to convert an unbounded mask (RealMask) into a bounded one (RealMaskRealInterval).
Jan Eglinger
@imagejan
Hm, so far I've only seen examples of this in discrete space, i.e. going via RandomAccessible and IntervalView, see imagej-roi-course
Curtis Rueden
@ctrueden
I wish someone besides me (looks at @maarzt in this case) would make more tutorial notebooks in imagej/tutorials. The imagej-roi-course belongs as a notebook there. And likely also a Maven project.
It makes sense as its own project during the learnathons... but then why not follow up by migrating shared useful materials out of learnathon space and into the official tutorials repo?
Kyle I S Harrington
@kephale
whoa, there is an imagej-roi course!
Curtis Rueden
@ctrueden
@kephale It was from the last Learnathon @ CSBD. Evolved over a couple of them, IIRC.
Unfortunately, they have been a hodge-podge of git repositories. Which ends up being fine during the event, and really tough afterward to see what's been presented.
Curtis Rueden
@ctrueden
@imagejan @kephale imglib/imglib2-roi#50
Jan Eglinger
@imagejan
:+1:
Christian Tischer
@tischi

@NicoKiaru I have the following workflow:

  1. I open a XML/H5 (that contains only a single Source) and view it in BDV.
  2. In BDV I change its AffineTransform using the manual transform UI of BDV
  3. Now I would like to save a new *.xml file that looks exactly as the original one that I opened, but I want a new <affine>...</affine> content, reflecting the additional transform that I manually added in BDV.

Do you know how to do this most efficiently? Do I have to construct a new SpimData object from the TransformedSource and then use XmlIoSpimData.save()? If so, would you have code already to construct SpimData from a single Source and the path to the corresponding .h5 file? Or are there other ways to save such an .xml file?

Nicolas Chiaruttini
@NicoKiaru
Hi Christian, you can use this spimData.getViewRegistrations().getViewRegistration(timePoint,iViewSetup).preconcatenateTransform(myAffineTransform); or spimData.getViewRegistrations().getViewRegistration(timePoint,iViewSetup).concatenateTransform(myAffineTransform);, with myAffineTransform being the transform retrieved from the TransformedSource. Then you can resave the dataset. FYI, I also found a trick to update the spimData when it's shown in the bdv (thanks to reflection to access a private method see https://github.com/BIOP/bigdataviewer_scijava/blob/master/src/main/java/ch/epfl/biop/bdv/scijava/command/spimdata/UpdateSpimDataDisplay.java)
Christian Tischer
@tischi
thanks!! ok, does that mean that spimData.getViewRegistrations().getViewRegistration(timePoint,iViewSetup).preconcatenateTransform(myAffineTransform); will not change the spimData displayed in Bdv?! (unless one does your trick)