-
Notifications
You must be signed in to change notification settings - Fork 17
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
[wip] OpenOrganelle demo #518
Conversation
BVV currently only works properly with UnsignedShortType
java.util.concurrent.ExecutionException: java.lang.ClassCastException: class net.imglib2.img.basictypeaccess.array.ShortArray cannot be cast to class net.imglib2.img.basictypeaccess.volatiles.VolatileShortAccess (net.imglib2.img.basictypeaccess.array.ShortArray and net.imglib2.img.basictypeaccess.volatiles.VolatileShortAccess are in unnamed module of loader 'app') It looks like this is happening in GenericShortType.updateContainer
@tpietzsch I'm getting stuck on the OpenOrganelle demo because the N5 data is However, the N5 is being opened as Volatile:
scenery will need some corresponding updates for proper detection of multiscale images that are opened with N5 (currently it is focused on detecting normal BDV images with XML metadata). |
@kephale At some point you need to use You could try to first So, unfortunately you'll have to make a (lazy) copy... :-( import bdv.util.volatiles.VolatileViews;
import net.imglib2.RandomAccessibleInterval;
import net.imglib2.algorithm.blocks.BlockAlgoUtils;
import net.imglib2.algorithm.blocks.convert.Convert;
import net.imglib2.blocks.PrimitiveBlocks;
import net.imglib2.cache.img.CachedCellImg;
import net.imglib2.type.numeric.integer.UnsignedByteType;
import net.imglib2.type.numeric.integer.UnsignedShortType;
import net.imglib2.type.volatiles.VolatileUnsignedShortType;
static RandomAccessibleInterval< VolatileUnsignedShortType > convert(
RandomAccessibleInterval< UnsignedByteType > rai )
{
final int[] cellDimensions = { 64, 64, 64 };
final PrimitiveBlocks< UnsignedByteType > blocks = PrimitiveBlocks.of( rai );
final CachedCellImg< UnsignedShortType, ? > img = BlockAlgoUtils.cellImg(
blocks,
Convert.convert( new UnsignedByteType(), new UnsignedShortType() ),
new UnsignedShortType(),
rai.dimensionsAsLongArray(),
cellDimensions
);
return VolatileViews.wrapAsVolatile( img );
} It requires recently released versions
Of course, the better solution would be to make BVV just handle these datatypes, but I don't have a timeline for that. |
Thank you very much @tpietzsch ! You've unblocked the demo work 🍪 ! |
This is getting stuck here https://github.com/scenerygraphics/scenery/blob/be284d2488c8635952d0a62f5ca3e5bed15742d1/src/main/kotlin/graphics/scenery/volumes/VolumeManager.kt#L396. it seems like it is trying to create a ton of FillTasks (129705 blocks?), the next thing i would check is how the BVV volume is being initialized w.r.t. the camera |
That sounds like it doesn't use multi-resolution |
migrated to #537 |
No description provided.