├── .github ├── build.sh ├── setup.sh └── workflows │ ├── build-main.yml │ └── build-pr.yml ├── .gitignore ├── .mailmap ├── LICENSE.txt ├── README.md ├── bin └── generate.groovy ├── doc ├── Class Diagram Color.png ├── The Generic Java Image Processing Library.doc ├── The Generic Java Image Processing Library.pdf ├── changelog.madison.txt ├── favicon.ico ├── favicon.png ├── imglib2-eclipse-clean-up-formatter-style.xml ├── imglib2-eclipse-clean-up-style.xml ├── imglib2-eclipse-mars-clean-up-formatter-style.xml ├── imglib2-idea-clean-up.xml ├── imglib2-logo-header.png ├── imglib2-logo-icon.png ├── imglib2-logo-icon.svg ├── imglib2-logo-inverse.svg ├── imglib2-logo-poster.svg ├── imglib2-logo-social.png ├── imglib2-logo-social.svg ├── imglib2-logo.png ├── imglib2-logo.svg ├── imglib2-qr-black.svg ├── imglib2-qr.svg ├── imglib2.dia ├── imglib2.svg └── net.imglib2.interpolation.randomaccess.LanczosInterpolator.LUT.bsh ├── pom.xml ├── src ├── main │ └── java │ │ └── net │ │ └── imglib2 │ │ ├── AbstractCursor.java │ │ ├── AbstractCursorInt.java │ │ ├── AbstractEuclideanSpace.java │ │ ├── AbstractInterval.java │ │ ├── AbstractLocalizable.java │ │ ├── AbstractLocalizableInt.java │ │ ├── AbstractLocalizingCursor.java │ │ ├── AbstractLocalizingCursorInt.java │ │ ├── AbstractRealInterval.java │ │ ├── AbstractRealLocalizable.java │ │ ├── AbstractWrappedInterval.java │ │ ├── AbstractWrappedLocalizable.java │ │ ├── AbstractWrappedPositionableLocalizable.java │ │ ├── AbstractWrappedRealInterval.java │ │ ├── Cursor.java │ │ ├── Dimensions.java │ │ ├── Dirty.java │ │ ├── EuclideanSpace.java │ │ ├── FinalDimensions.java │ │ ├── FinalInterval.java │ │ ├── FinalRealInterval.java │ │ ├── FlatIterationOrder.java │ │ ├── Interval.java │ │ ├── IterableInterval.java │ │ ├── IterableRealInterval.java │ │ ├── Iterator.java │ │ ├── KDTree.java │ │ ├── KDTreeNode.java │ │ ├── Localizable.java │ │ ├── LocalizableSampler.java │ │ ├── Point.java │ │ ├── PointSample.java │ │ ├── PointSampleList.java │ │ ├── Positionable.java │ │ ├── RandomAccess.java │ │ ├── RandomAccessible.java │ │ ├── RandomAccessibleInterval.java │ │ ├── RealCursor.java │ │ ├── RealInterval.java │ │ ├── RealLocalizable.java │ │ ├── RealLocalizableSampler.java │ │ ├── RealPoint.java │ │ ├── RealPointSample.java │ │ ├── RealPointSampleList.java │ │ ├── RealPositionable.java │ │ ├── RealRandomAccess.java │ │ ├── RealRandomAccessible.java │ │ ├── RealRandomAccessibleRealInterval.java │ │ ├── Sampler.java │ │ ├── Typed.java │ │ ├── View.java │ │ ├── Volatile.java │ │ ├── blocks │ │ ├── ArrayImgRangeCopier.java │ │ ├── BlockInterval.java │ │ ├── CellImgRangeCopier.java │ │ ├── Convert.java │ │ ├── ConvertImpl.java │ │ ├── Extension.java │ │ ├── ExtensionImpl.java │ │ ├── FallbackPrimitiveBlocks.java │ │ ├── FallbackProperties.java │ │ ├── MemCopy.java │ │ ├── PermuteInvert.java │ │ ├── PlanarImgRangeCopier.java │ │ ├── PrimitiveBlocks.java │ │ ├── PrimitiveBlocksUtils.java │ │ ├── PrimitiveTypeProperties.java │ │ ├── RangeCopier.java │ │ ├── Ranges.java │ │ ├── RangesImpl.java │ │ ├── SubArrayCopy.java │ │ ├── TempArray.java │ │ ├── TempArrayImpl.java │ │ ├── ViewAnalyzer.java │ │ ├── ViewNode.java │ │ ├── ViewPrimitiveBlocks.java │ │ ├── ViewProperties.java │ │ └── ViewPropertiesOrError.java │ │ ├── concatenate │ │ ├── Concatenable.java │ │ ├── ConcatenateUtils.java │ │ └── PreConcatenable.java │ │ ├── converter │ │ ├── ARGBARGBDoubleConverter.java │ │ ├── ARGBDoubleARGBConverter.java │ │ ├── AbstractConvertedCursor.java │ │ ├── AbstractConvertedIterableInterval.java │ │ ├── AbstractConvertedIterableRandomAccessibleInterval.java │ │ ├── AbstractConvertedIterableRealInterval.java │ │ ├── AbstractConvertedRandomAccess.java │ │ ├── AbstractConvertedRandomAccessible.java │ │ ├── AbstractConvertedRandomAccessibleInterval.java │ │ ├── AbstractConvertedRealCursor.java │ │ ├── AbstractConvertedRealRandomAccess.java │ │ ├── AbstractConvertedRealRandomAccessible.java │ │ ├── BiConverter.java │ │ ├── ChannelARGBConverter.java │ │ ├── ColorChannelOrder.java │ │ ├── ComplexImaginaryFloatConverter.java │ │ ├── ComplexPhaseFloatConverter.java │ │ ├── ComplexPowerFloatConverter.java │ │ ├── ComplexPowerGLogFloatConverter.java │ │ ├── ComplexRealFloatConverter.java │ │ ├── CompositeChannelConverter.java │ │ ├── Converter.java │ │ ├── Converters.java │ │ ├── RealARGBConverter.java │ │ ├── RealDoubleConverter.java │ │ ├── RealFloatConverter.java │ │ ├── RealLUTConverter.java │ │ ├── RealTypeConverterInternals.java │ │ ├── RealTypeConverters.java │ │ ├── RealUnsignedByteConverter.java │ │ ├── RealUnsignedShortConverter.java │ │ ├── TypeIdentity.java │ │ ├── VolatileRealTypeARGBConverter.java │ │ ├── read │ │ │ ├── BiConvertedCursor.java │ │ │ ├── BiConvertedIterableInterval.java │ │ │ ├── BiConvertedIterableRealInterval.java │ │ │ ├── BiConvertedRandomAccess.java │ │ │ ├── BiConvertedRandomAccessible.java │ │ │ ├── BiConvertedRandomAccessibleInterval.java │ │ │ ├── BiConvertedRealCursor.java │ │ │ ├── BiConvertedRealRandomAccess.java │ │ │ ├── BiConvertedRealRandomAccessible.java │ │ │ ├── BiConvertedRealRandomAccessibleRealInterval.java │ │ │ ├── ConvertedCursor.java │ │ │ ├── ConvertedIterableInterval.java │ │ │ ├── ConvertedIterableRealInterval.java │ │ │ ├── ConvertedRandomAccess.java │ │ │ ├── ConvertedRandomAccessible.java │ │ │ ├── ConvertedRandomAccessibleInterval.java │ │ │ ├── ConvertedRealCursor.java │ │ │ ├── ConvertedRealRandomAccess.java │ │ │ ├── ConvertedRealRandomAccessible.java │ │ │ └── ConvertedRealRandomAccessibleRealInterval.java │ │ └── readwrite │ │ │ ├── ARGBChannelSamplerConverter.java │ │ │ ├── CompositeARGBSamplerConverter.java │ │ │ ├── RealDoubleSamplerConverter.java │ │ │ ├── RealFloatSamplerConverter.java │ │ │ ├── SamplerConverter.java │ │ │ ├── TypeUtils.java │ │ │ ├── WriteConvertedCursor.java │ │ │ ├── WriteConvertedIterableInterval.java │ │ │ ├── WriteConvertedIterableRandomAccessibleInterval.java │ │ │ ├── WriteConvertedIterableRealInterval.java │ │ │ ├── WriteConvertedRandomAccess.java │ │ │ ├── WriteConvertedRandomAccessible.java │ │ │ ├── WriteConvertedRandomAccessibleInterval.java │ │ │ └── WriteConvertedRealCursor.java │ │ ├── display │ │ ├── ARGBARGBColorConverter.java │ │ ├── AbstractArrayColorTable.java │ │ ├── AbstractLinearRange.java │ │ ├── ArrayColorTable.java │ │ ├── ColorConverter.java │ │ ├── ColorTable.java │ │ ├── ColorTable16.java │ │ ├── ColorTable8.java │ │ ├── LinearRange.java │ │ ├── RealARGBColorConverter.java │ │ ├── RealARGBColorConverterFactory.java │ │ ├── ScaledARGBConverter.java │ │ ├── awt │ │ │ ├── SignedByteDataBuffer.java │ │ │ ├── SignedShortDataBuffer.java │ │ │ └── UnsignedIntDataBuffer.java │ │ ├── projector │ │ │ ├── AbstractProjector2D.java │ │ │ ├── IterableIntervalProjector2D.java │ │ │ ├── Projector.java │ │ │ ├── RandomAccessibleProjector2D.java │ │ │ ├── composite │ │ │ │ ├── CompositeXYProjector.java │ │ │ │ └── CompositeXYRandomAccessibleProjector.java │ │ │ ├── sampler │ │ │ │ ├── IntervalSampler.java │ │ │ │ ├── ProjectedSampler.java │ │ │ │ ├── SamplingProjector2D.java │ │ │ │ └── SelectiveSampler.java │ │ │ ├── specialized │ │ │ │ ├── ArrayImgXYByteProjector.java │ │ │ │ ├── ArrayImgXYShortProjector.java │ │ │ │ ├── PlanarImgContainerSamplerImpl.java │ │ │ │ ├── PlanarImgXYByteProjector.java │ │ │ │ └── PlanarImgXYShortProjector.java │ │ │ └── volatiles │ │ │ │ └── Volatile2DRandomAccessibleProjector.java │ │ └── screenimage │ │ │ ├── ScreenImage.java │ │ │ └── awt │ │ │ ├── ARGBScreenImage.java │ │ │ ├── AWTScreenImage.java │ │ │ ├── AWTScreenImageUtil.java │ │ │ ├── ArrayImgAWTScreenImage.java │ │ │ ├── ByteAWTScreenImage.java │ │ │ ├── DoubleAWTScreenImage.java │ │ │ ├── FloatAWTScreenImage.java │ │ │ ├── IntAWTScreenImage.java │ │ │ ├── ShortAWTScreenImage.java │ │ │ ├── UnsignedByteAWTScreenImage.java │ │ │ ├── UnsignedIntAWTScreenImage.java │ │ │ └── UnsignedShortAWTScreenImage.java │ │ ├── exception │ │ ├── ImgLibException.java │ │ ├── IncompatibleTypeException.java │ │ └── InvalidDimensionsException.java │ │ ├── histogram │ │ ├── BinMapper1d.java │ │ ├── DiscreteFrequencyDistribution.java │ │ ├── Histogram1d.java │ │ ├── HistogramNd.java │ │ ├── Integer1dBinMapper.java │ │ └── Real1dBinMapper.java │ │ ├── img │ │ ├── AbstractImg.java │ │ ├── AbstractNativeImg.java │ │ ├── Img.java │ │ ├── ImgFactory.java │ │ ├── ImgView.java │ │ ├── NativeImg.java │ │ ├── NativeImgFactory.java │ │ ├── WrappedImg.java │ │ ├── array │ │ │ ├── AbstractArrayCursor.java │ │ │ ├── AbstractArrayLocalizingCursor.java │ │ │ ├── ArrayCursor.java │ │ │ ├── ArrayImg.java │ │ │ ├── ArrayImgFactory.java │ │ │ ├── ArrayImgs.java │ │ │ ├── ArrayLocalizingCursor.java │ │ │ ├── ArrayLocalizingSpliterator.java │ │ │ ├── ArrayLocalizingSubIntervalCursor.java │ │ │ ├── ArrayRandomAccess.java │ │ │ ├── ArraySpliterator.java │ │ │ └── ArraySubIntervalCursor.java │ │ ├── basictypeaccess │ │ │ ├── AccessFlags.java │ │ │ ├── ArrayDataAccessFactory.java │ │ │ ├── BooleanAccess.java │ │ │ ├── ByteAccess.java │ │ │ ├── CharAccess.java │ │ │ ├── DataAccess.java │ │ │ ├── DoubleAccess.java │ │ │ ├── FloatAccess.java │ │ │ ├── IntAccess.java │ │ │ ├── LongAccess.java │ │ │ ├── PlanarAccess.java │ │ │ ├── ShortAccess.java │ │ │ ├── array │ │ │ │ ├── AbstractBooleanArray.java │ │ │ │ ├── AbstractByteArray.java │ │ │ │ ├── AbstractCharArray.java │ │ │ │ ├── AbstractDoubleArray.java │ │ │ │ ├── AbstractFloatArray.java │ │ │ │ ├── AbstractIntArray.java │ │ │ │ ├── AbstractLongArray.java │ │ │ │ ├── AbstractShortArray.java │ │ │ │ ├── ArrayDataAccess.java │ │ │ │ ├── BooleanArray.java │ │ │ │ ├── ByteArray.java │ │ │ │ ├── CharArray.java │ │ │ │ ├── DirtyBooleanArray.java │ │ │ │ ├── DirtyByteArray.java │ │ │ │ ├── DirtyCharArray.java │ │ │ │ ├── DirtyDoubleArray.java │ │ │ │ ├── DirtyFloatArray.java │ │ │ │ ├── DirtyIntArray.java │ │ │ │ ├── DirtyLongArray.java │ │ │ │ ├── DirtyShortArray.java │ │ │ │ ├── DoubleArray.java │ │ │ │ ├── FloatArray.java │ │ │ │ ├── IntArray.java │ │ │ │ ├── LongArray.java │ │ │ │ └── ShortArray.java │ │ │ ├── nio │ │ │ │ ├── AbstractBufferAccess.java │ │ │ │ ├── BufferAccess.java │ │ │ │ ├── BufferDataAccessFactory.java │ │ │ │ ├── ByteBufferAccess.java │ │ │ │ ├── CharBufferAccess.java │ │ │ │ ├── DoubleBufferAccess.java │ │ │ │ ├── FloatBufferAccess.java │ │ │ │ ├── IntBufferAccess.java │ │ │ │ ├── LongBufferAccess.java │ │ │ │ └── ShortBufferAccess.java │ │ │ └── volatiles │ │ │ │ ├── VolatileAccess.java │ │ │ │ ├── VolatileArrayDataAccess.java │ │ │ │ ├── VolatileBooleanAccess.java │ │ │ │ ├── VolatileByteAccess.java │ │ │ │ ├── VolatileCharAccess.java │ │ │ │ ├── VolatileDoubleAccess.java │ │ │ │ ├── VolatileFloatAccess.java │ │ │ │ ├── VolatileIntAccess.java │ │ │ │ ├── VolatileLongAccess.java │ │ │ │ ├── VolatileShortAccess.java │ │ │ │ └── array │ │ │ │ ├── AbstractVolatileBooleanArray.java │ │ │ │ ├── AbstractVolatileByteArray.java │ │ │ │ ├── AbstractVolatileCharArray.java │ │ │ │ ├── AbstractVolatileDoubleArray.java │ │ │ │ ├── AbstractVolatileFloatArray.java │ │ │ │ ├── AbstractVolatileIntArray.java │ │ │ │ ├── AbstractVolatileLongArray.java │ │ │ │ ├── AbstractVolatileShortArray.java │ │ │ │ ├── DirtyVolatileBooleanArray.java │ │ │ │ ├── DirtyVolatileByteArray.java │ │ │ │ ├── DirtyVolatileCharArray.java │ │ │ │ ├── DirtyVolatileDoubleArray.java │ │ │ │ ├── DirtyVolatileFloatArray.java │ │ │ │ ├── DirtyVolatileIntArray.java │ │ │ │ ├── DirtyVolatileLongArray.java │ │ │ │ ├── DirtyVolatileShortArray.java │ │ │ │ ├── VolatileBooleanArray.java │ │ │ │ ├── VolatileByteArray.java │ │ │ │ ├── VolatileCharArray.java │ │ │ │ ├── VolatileDoubleArray.java │ │ │ │ ├── VolatileFloatArray.java │ │ │ │ ├── VolatileIntArray.java │ │ │ │ ├── VolatileLongArray.java │ │ │ │ └── VolatileShortArray.java │ │ ├── cell │ │ │ ├── AbstractCellImg.java │ │ │ ├── Cell.java │ │ │ ├── CellCursor.java │ │ │ ├── CellGrid.java │ │ │ ├── CellImg.java │ │ │ ├── CellImgFactory.java │ │ │ ├── CellIterationOrder.java │ │ │ ├── CellLocalizingCursor.java │ │ │ ├── CellRandomAccess.java │ │ │ ├── CellSpliterator.java │ │ │ └── LazyCellImg.java │ │ ├── list │ │ │ ├── AbstractListImg.java │ │ │ ├── AbstractLongListImg.java │ │ │ ├── ListCursor.java │ │ │ ├── ListImg.java │ │ │ ├── ListImgFactory.java │ │ │ ├── ListLocalizingCursor.java │ │ │ └── ListRandomAccess.java │ │ ├── planar │ │ │ ├── PlanarCursor.java │ │ │ ├── PlanarCursor1D.java │ │ │ ├── PlanarCursor2D.java │ │ │ ├── PlanarImg.java │ │ │ ├── PlanarImgFactory.java │ │ │ ├── PlanarImgs.java │ │ │ ├── PlanarLocalizingCursor.java │ │ │ ├── PlanarLocalizingCursor1D.java │ │ │ ├── PlanarLocalizingCursor2D.java │ │ │ ├── PlanarPlaneSubsetCursor.java │ │ │ ├── PlanarPlaneSubsetLocalizingCursor.java │ │ │ ├── PlanarRandomAccess.java │ │ │ ├── PlanarRandomAccess1D.java │ │ │ └── PlanarSpliterator.java │ │ └── sparse │ │ │ ├── BooleanNtree.java │ │ │ ├── ByteNtree.java │ │ │ ├── CharNtree.java │ │ │ ├── DoubleNtree.java │ │ │ ├── FloatNtree.java │ │ │ ├── IntNtree.java │ │ │ ├── LongNtree.java │ │ │ ├── Ntree.java │ │ │ ├── NtreeAccess.java │ │ │ ├── NtreeCursor.java │ │ │ ├── NtreeImg.java │ │ │ ├── NtreeImgFactory.java │ │ │ ├── NtreeRandomAccess.java │ │ │ └── ShortNtree.java │ │ ├── interpolation │ │ ├── Interpolant.java │ │ ├── InterpolatorFactory.java │ │ ├── neighborsearch │ │ │ ├── InverseDistanceWeightingInterpolator.java │ │ │ ├── InverseDistanceWeightingInterpolatorFactory.java │ │ │ ├── NearestNeighborSearchInterpolator.java │ │ │ ├── NearestNeighborSearchInterpolatorFactory.java │ │ │ ├── RadialKDTreeInterpolator.java │ │ │ └── RadialKDTreeInterpolatorFactory.java │ │ ├── randomaccess │ │ │ ├── ClampingNLinearInterpolatorFactory.java │ │ │ ├── ClampingNLinearInterpolatorRealType.java │ │ │ ├── ClampingNLinearInterpolatorVolatileARGB.java │ │ │ ├── ClampingNLinearInterpolatorVolatileRealType.java │ │ │ ├── FloorInterpolator.java │ │ │ ├── FloorInterpolatorFactory.java │ │ │ ├── LanczosInterpolator.java │ │ │ ├── LanczosInterpolatorFactory.java │ │ │ ├── NLinearInterpolator.java │ │ │ ├── NLinearInterpolator1D.java │ │ │ ├── NLinearInterpolator2D.java │ │ │ ├── NLinearInterpolator3D.java │ │ │ ├── NLinearInterpolatorARGB.java │ │ │ ├── NLinearInterpolatorARGBFactory.java │ │ │ ├── NLinearInterpolatorFactory.java │ │ │ ├── NearestNeighborInterpolator.java │ │ │ └── NearestNeighborInterpolatorFactory.java │ │ └── stack │ │ │ ├── LinearRealRandomAccessibleStackInterpolator.java │ │ │ ├── LinearRealRandomAccessibleStackInterpolatorFactory.java │ │ │ ├── NearestNeighborRealRandomAccessibleStackInterpolator.java │ │ │ └── NearestNeighborRealRandomAccessibleStackInterpolatorFactory.java │ │ ├── iterator │ │ ├── IntervalIterator.java │ │ ├── LocalizingIntervalIterator.java │ │ ├── LocalizingRealIntervalIterator.java │ │ ├── LocalizingZeroMinIntervalIterator.java │ │ ├── OffsetableIntervalIterator.java │ │ ├── OffsetableLocalizingIntervalIterator.java │ │ └── ZeroMinIntervalIterator.java │ │ ├── kdtree │ │ ├── KDTreeData.java │ │ ├── KDTreeImpl.java │ │ ├── KDTreePositions.java │ │ ├── KDTreeUtils.java │ │ ├── KNearestNeighborSearchImpl.java │ │ ├── NearestNeighborSearchImpl.java │ │ └── RadiusNeighborSearchImpl.java │ │ ├── loops │ │ ├── BindActionToSamplers.java │ │ ├── ClassCopier.java │ │ ├── ClassCopyProvider.java │ │ ├── FastCursorLoops.java │ │ ├── FastCursorRandomAccessLoops.java │ │ ├── IntervalChunks.java │ │ ├── IterableLoopBuilder.java │ │ ├── ListUtils.java │ │ ├── LoopBuilder.java │ │ ├── LoopUtils.java │ │ └── SyncedPositionables.java │ │ ├── neighborsearch │ │ ├── KNearestNeighborSearch.java │ │ ├── KNearestNeighborSearchOnIterableRealInterval.java │ │ ├── KNearestNeighborSearchOnKDTree.java │ │ ├── NearestNeighborSearch.java │ │ ├── NearestNeighborSearchOnIterableRealInterval.java │ │ ├── NearestNeighborSearchOnKDTree.java │ │ ├── RadiusNeighborSearch.java │ │ └── RadiusNeighborSearchOnKDTree.java │ │ ├── outofbounds │ │ ├── AbstractOutOfBoundsMirror.java │ │ ├── AbstractOutOfBoundsValue.java │ │ ├── Bounded.java │ │ ├── OutOfBounds.java │ │ ├── OutOfBoundsBorder.java │ │ ├── OutOfBoundsBorderFactory.java │ │ ├── OutOfBoundsConstantValue.java │ │ ├── OutOfBoundsConstantValueFactory.java │ │ ├── OutOfBoundsFactory.java │ │ ├── OutOfBoundsMirrorDoubleBoundary.java │ │ ├── OutOfBoundsMirrorExpWindowing.java │ │ ├── OutOfBoundsMirrorExpWindowingFactory.java │ │ ├── OutOfBoundsMirrorFactory.java │ │ ├── OutOfBoundsMirrorSingleBoundary.java │ │ ├── OutOfBoundsPeriodic.java │ │ ├── OutOfBoundsPeriodicFactory.java │ │ ├── OutOfBoundsRandomValue.java │ │ ├── OutOfBoundsRandomValueFactory.java │ │ ├── OutOfBoundsZeroFactory.java │ │ ├── RealOutOfBounds.java │ │ ├── RealOutOfBoundsFactory.java │ │ └── RealOutOfBoundsRealRandomAccess.java │ │ ├── parallel │ │ ├── DefaultTaskExecutor.java │ │ ├── ForkJoinExecutorService.java │ │ ├── Parallelization.java │ │ ├── SequentialExecutorService.java │ │ ├── SequentialTaskExecutor.java │ │ ├── TaskExecutor.java │ │ └── TaskExecutors.java │ │ ├── position │ │ ├── AbstractFunctionEuclideanSpace.java │ │ ├── FunctionRandomAccessible.java │ │ ├── FunctionRealRandomAccessible.java │ │ ├── PositionRandomAccessible.java │ │ ├── RealPositionRealRandomAccessible.java │ │ └── transform │ │ │ ├── AbstractPositionableTransform.java │ │ │ ├── Floor.java │ │ │ ├── FloorOffset.java │ │ │ └── Round.java │ │ ├── stream │ │ ├── CursorSpliterator.java │ │ ├── LocalizableSamplerWrapper.java │ │ ├── LocalizableSpliterator.java │ │ ├── RealCursorSpliterator.java │ │ ├── RealLocalizableSamplerWrapper.java │ │ ├── RealLocalizableSpliterator.java │ │ └── Streams.java │ │ ├── test │ │ ├── ImgLib2Assert.java │ │ └── RandomImgs.java │ │ ├── transform │ │ ├── InverseTransform.java │ │ ├── InvertibleTransform.java │ │ ├── Transform.java │ │ ├── Transformable.java │ │ └── integer │ │ │ ├── AbstractMixedTransform.java │ │ │ ├── BoundingBox.java │ │ │ ├── BoundingBoxTransform.java │ │ │ ├── ComponentMapping.java │ │ │ ├── ComponentMappingTransform.java │ │ │ ├── Mixed.java │ │ │ ├── MixedTransform.java │ │ │ ├── SequentializeTransform.java │ │ │ ├── Slicing.java │ │ │ ├── SlicingTransform.java │ │ │ ├── Translation.java │ │ │ ├── TranslationTransform.java │ │ │ ├── permutation │ │ │ ├── AbstractPermutationTransform.java │ │ │ ├── PermutationTransform.java │ │ │ └── SingleDimensionPermutationTransform.java │ │ │ └── shear │ │ │ ├── AbstractShearTransform.java │ │ │ ├── InverseShearTransform.java │ │ │ └── ShearTransform.java │ │ ├── type │ │ ├── AbstractBit64Type.java │ │ ├── AbstractBitType.java │ │ ├── AbstractNativeType.java │ │ ├── BasePairType.java │ │ ├── BooleanType.java │ │ ├── Index.java │ │ ├── NativeType.java │ │ ├── NativeTypeFactory.java │ │ ├── PrimitiveType.java │ │ ├── Type.java │ │ ├── label │ │ │ ├── BasePairBitType.java │ │ │ └── BasePairCharType.java │ │ ├── logic │ │ │ ├── BitType.java │ │ │ ├── BoolType.java │ │ │ └── NativeBoolType.java │ │ ├── numeric │ │ │ ├── ARGBDoubleType.java │ │ │ ├── ARGBType.java │ │ │ ├── AbstractARGBDoubleType.java │ │ │ ├── ComplexType.java │ │ │ ├── IntegerType.java │ │ │ ├── NativeARGBDoubleType.java │ │ │ ├── NumericType.java │ │ │ ├── RealType.java │ │ │ ├── complex │ │ │ │ ├── AbstractComplexType.java │ │ │ │ ├── ComplexDoubleType.java │ │ │ │ └── ComplexFloatType.java │ │ │ ├── integer │ │ │ │ ├── AbstractIntegerBitType.java │ │ │ │ ├── AbstractIntegerType.java │ │ │ │ ├── ByteType.java │ │ │ │ ├── GenericByteType.java │ │ │ │ ├── GenericIntType.java │ │ │ │ ├── GenericLongType.java │ │ │ │ ├── GenericShortType.java │ │ │ │ ├── IntType.java │ │ │ │ ├── IntegerTypes.java │ │ │ │ ├── LongType.java │ │ │ │ ├── ShortType.java │ │ │ │ ├── Unsigned128BitType.java │ │ │ │ ├── Unsigned12BitType.java │ │ │ │ ├── Unsigned2BitType.java │ │ │ │ ├── Unsigned4BitType.java │ │ │ │ ├── UnsignedByteType.java │ │ │ │ ├── UnsignedIntType.java │ │ │ │ ├── UnsignedLongType.java │ │ │ │ ├── UnsignedShortType.java │ │ │ │ └── UnsignedVariableBitLengthType.java │ │ │ └── real │ │ │ │ ├── AbstractRealType.java │ │ │ │ ├── DoubleType.java │ │ │ │ └── FloatType.java │ │ ├── operators │ │ │ ├── Add.java │ │ │ ├── Div.java │ │ │ ├── Mul.java │ │ │ ├── MulFloatingPoint.java │ │ │ ├── Pow.java │ │ │ ├── PowFloatingPoint.java │ │ │ ├── SetOne.java │ │ │ ├── SetZero.java │ │ │ ├── Sub.java │ │ │ └── ValueEquals.java │ │ └── volatiles │ │ │ ├── AbstractVolatileNativeNumericType.java │ │ │ ├── AbstractVolatileNativeRealType.java │ │ │ ├── AbstractVolatileNumericType.java │ │ │ ├── AbstractVolatileRealType.java │ │ │ ├── VolatileARGBType.java │ │ │ ├── VolatileByteType.java │ │ │ ├── VolatileDoubleType.java │ │ │ ├── VolatileFloatType.java │ │ │ ├── VolatileIntType.java │ │ │ ├── VolatileLongType.java │ │ │ ├── VolatileNumericType.java │ │ │ ├── VolatileRealType.java │ │ │ ├── VolatileShortType.java │ │ │ ├── VolatileUnsignedByteType.java │ │ │ ├── VolatileUnsignedIntType.java │ │ │ ├── VolatileUnsignedLongType.java │ │ │ └── VolatileUnsignedShortType.java │ │ ├── util │ │ ├── BenchmarkHelper.java │ │ ├── Binning.java │ │ ├── Cast.java │ │ ├── CloseableThreadLocal.java │ │ ├── ConstantUtils.java │ │ ├── FlatCollections.java │ │ ├── Fraction.java │ │ ├── Grid.java │ │ ├── ImgUtil.java │ │ ├── IntervalIndexer.java │ │ ├── Intervals.java │ │ ├── IterablePair.java │ │ ├── KthElement.java │ │ ├── LinAlgHelpers.java │ │ ├── Localizables.java │ │ ├── Pair.java │ │ ├── Partition.java │ │ ├── RealSum.java │ │ ├── StopWatch.java │ │ ├── Util.java │ │ └── ValuePair.java │ │ └── view │ │ ├── BundleView.java │ │ ├── ExtendedRandomAccessibleInterval.java │ │ ├── ExtendedRealRandomAccessibleRealInterval.java │ │ ├── FullSourceMapMixedRandomAccess.java │ │ ├── FullSourceMapSlicingRandomAccess.java │ │ ├── FunctionView.java │ │ ├── HyperSlice.java │ │ ├── HyperSlicesView.java │ │ ├── IntervalView.java │ │ ├── IterableRandomAccessibleInterval.java │ │ ├── MixedRandomAccess.java │ │ ├── MixedTransformView.java │ │ ├── RandomAccessibleIntervalCursor.java │ │ ├── RandomAccessibleOnRealRandomAccessible.java │ │ ├── RandomAccessiblePair.java │ │ ├── SlicingRandomAccess.java │ │ ├── StackView.java │ │ ├── SubsampleIntervalView.java │ │ ├── SubsampleView.java │ │ ├── TransformBuilder.java │ │ ├── TransformRandomAccess.java │ │ ├── TransformView.java │ │ ├── TransformedRandomAccessible.java │ │ ├── TranslationRandomAccess.java │ │ ├── ViewTransforms.java │ │ ├── Views.java │ │ ├── composite │ │ ├── AbstractComposite.java │ │ ├── AbstractNumericComposite.java │ │ ├── Composite.java │ │ ├── CompositeFactory.java │ │ ├── CompositeIntervalView.java │ │ ├── CompositeView.java │ │ ├── GenericComposite.java │ │ ├── InflateView.java │ │ ├── InterleaveView.java │ │ ├── NumericComposite.java │ │ └── RealComposite.java │ │ ├── fluent │ │ ├── RandomAccessibleIntervalView.java │ │ ├── RandomAccessibleView.java │ │ └── RealRandomAccessibleView.java │ │ └── iteration │ │ ├── IterableTransformBuilder.java │ │ ├── SlicingCursor.java │ │ └── SubIntervalIterable.java └── test │ └── java │ ├── net │ └── imglib2 │ │ ├── BinningTest.java │ │ ├── DimensionsTest.java │ │ ├── DoubleUtil.java │ │ ├── FinalDimensionsTest.java │ │ ├── FinalIntervalTest.java │ │ ├── FinalRealIntervalTest.java │ │ ├── IntervalTest.java │ │ ├── LocalizableTest.java │ │ ├── PointTest.java │ │ ├── RandomAccessTest.java │ │ ├── RandomAccessibleIntervalTest.java │ │ ├── RandomAccessibleTest.java │ │ ├── RealIntervalTest.java │ │ ├── RealLocalizableTest.java │ │ ├── RealPointSampleListTest.java │ │ ├── RealPointTest.java │ │ ├── RealRandomAccessTest.java │ │ ├── RealRandomAccessibleTest.java │ │ ├── TestAbstractRealLocalizable.java │ │ ├── blocks │ │ ├── ConvertBenchmark.java │ │ ├── CopyBenchmarkDouble.java │ │ ├── CopyBenchmarkFloat.java │ │ ├── CopyBenchmarkPolymorphic.java │ │ ├── CopyBenchmarkUnsignedByte.java │ │ ├── CopyBenchmarkUnsignedShort.java │ │ ├── CopyBenchmarkViewPrimitiveBlocks.java │ │ ├── PermuteInvertBenchmark.java │ │ └── RangesTest.java │ │ ├── converter │ │ ├── AbstractConvertedRandomAccessibleIntervalTest.java │ │ ├── BiConvertersTest.java │ │ ├── ConvertersBenchmark.java │ │ ├── ConvertersTest.java │ │ ├── RealTypeConverterInternalsTest.java │ │ ├── RealTypeConvertersBenchmark.java │ │ ├── RealTypeConvertersImageSizeBenchmark.java │ │ └── RealTypeConvertersTest.java │ │ ├── display │ │ └── ARGBScreenImageExpectationChecking.java │ │ ├── histogram │ │ ├── Histogram1dTest.java │ │ ├── HistogramNdTest.java │ │ ├── HistogramPerformanceTest.java │ │ ├── Integer1dBinMapperTest.java │ │ └── Real1dBinMapperTest.java │ │ ├── img │ │ ├── AbstractSubIntervalIterableCursorTest.java │ │ ├── ImgFactoryTest.java │ │ ├── ImgViewTest.java │ │ ├── IterableSubIntervalBenchmark.java │ │ ├── array │ │ │ ├── ArrayImgTest.java │ │ │ ├── ArrayImgsTest.java │ │ │ ├── ArrayIterableSubIntervalCursorTest.java │ │ │ └── ArrayRandomAccessBenchmark.java │ │ ├── cell │ │ │ ├── ArrayRandomAccessBenchmark.java │ │ │ ├── CellContainerFactoryTest.java │ │ │ ├── CellContainerTest.java │ │ │ ├── CellCursorTest.java │ │ │ ├── CellImgTest.java │ │ │ ├── CellRandomAccessBenchmark.java │ │ │ ├── CellTest.java │ │ │ └── CopyTest.java │ │ ├── list │ │ │ └── CopyTest.java │ │ ├── planar │ │ │ ├── CopyTest.java │ │ │ ├── PlanarImgTest.java │ │ │ ├── PlanarIterableSubIntervalCursorTest.java │ │ │ └── PlanarRandomAccessBenchmark.java │ │ └── sparse │ │ │ └── NtreeTest.java │ │ ├── interpolation │ │ └── stack │ │ │ ├── LinearRealRandomAccessibleStackInterpolatorTest.java │ │ │ └── NearestNeighborRealRandomAccessibleStackInterpolatorTest.java │ │ ├── iterationorder │ │ └── IterationOrderTests.java │ │ ├── iterator │ │ └── RealIntervalIteratorTests.java │ │ ├── kdtree │ │ ├── KDTreeBenchmark.java │ │ ├── KDTreeImplTest.java │ │ └── KDTreeTest.java │ │ ├── loops │ │ ├── ClassCopierTest.java │ │ ├── ClassCopyProviderBenchmark.java │ │ ├── ClassCopyProviderTest.java │ │ ├── IntervalChunksTest.java │ │ ├── IterableLoopBuilderTest.java │ │ ├── LoopBuilderTest.java │ │ ├── LoopBuilderVsCursorsBenchmark.java │ │ ├── LoopPerformanceBenchmark.java │ │ ├── LoopUtilsTest.java │ │ └── SyncedPositionablesBenchmark.java │ │ ├── neighborsearch │ │ ├── KDTreeTest.java │ │ └── NearestNeighborSearchOnIterableRealIntervalTest.java │ │ ├── outofbounds │ │ ├── OutOfBoundsBorderBenchmark.java │ │ ├── OutOfBoundsBorderTest.java │ │ ├── OutOfBoundsMirrorDoubleBoundaryTest.java │ │ ├── OutOfBoundsMirrorSingleBoundaryTest.java │ │ └── OutOfBoundsPeriodicTest.java │ │ ├── parallel │ │ ├── DefaultTaskExecutorTest.java │ │ ├── ParallelizationBenchmark.java │ │ ├── ParallelizationDemo.java │ │ ├── ParallelizationTest.java │ │ └── TaskExecutorsTest.java │ │ ├── position │ │ ├── FunctionRandomAccessibleTest.java │ │ ├── FunctionRealRandomAccessibleTest.java │ │ └── transform │ │ │ └── FloorOffsetTest.java │ │ ├── stream │ │ ├── ArrayStreamBenchmark.java │ │ ├── CellStreamBenchmark.java │ │ ├── ImgStreamTest.java │ │ ├── LocalizableSamplerStreamBenchmark.java │ │ ├── LocalizingStreamTest.java │ │ └── PlanarStreamBenchmark.java │ │ ├── test │ │ ├── ImgLib2AssertTest.java │ │ └── RandomImgsTest.java │ │ ├── transform │ │ └── integer │ │ │ ├── permutation │ │ │ ├── AbstractPermutationTransformTest.java │ │ │ ├── PermutationTransformTest.java │ │ │ └── SingleDimensionPermutationTransformTest.java │ │ │ └── shear │ │ │ └── ShearTransformTest.java │ │ ├── type │ │ ├── logic │ │ │ ├── BitTypeArrayImgSizeTest.java │ │ │ ├── BitTypeTest.java │ │ │ └── NativeBoolTypeTest.java │ │ └── numeric │ │ │ ├── NumericTypeTest.java │ │ │ ├── complex │ │ │ ├── ComplexDoubleTypeTest.java │ │ │ └── ComplexFloatTypeTest.java │ │ │ └── integer │ │ │ ├── ByteTypeTest.java │ │ │ ├── IntTypeTest.java │ │ │ ├── IntegerTypeTest.java │ │ │ ├── IntegerTypesTest.java │ │ │ ├── LongTypeTest.java │ │ │ ├── ShortTypeTest.java │ │ │ ├── Unsigned128BitTypeTest.java │ │ │ ├── Unsigned12BitTypeTest.java │ │ │ ├── Unsigned2BitTypeTest.java │ │ │ ├── Unsigned4BitTypeTest.java │ │ │ ├── UnsignedByteTypeTest.java │ │ │ ├── UnsignedIntTypeTest.java │ │ │ ├── UnsignedLongTypeTest.java │ │ │ ├── UnsignedShortTypeTest.java │ │ │ └── UnsignedVariableBitLengthTypeTest.java │ │ ├── util │ │ ├── ConstantUtilsTest.java │ │ ├── FlatCollectionsBenchmark.java │ │ ├── FlatCollectionsTest.java │ │ ├── ImgTestHelper.java │ │ ├── ImgUtilTest.java │ │ ├── IntervalIndexerTest.java │ │ ├── IntervalsTest.java │ │ ├── IterablePairTest.java │ │ ├── KthElementTest.java │ │ ├── LinAlgHelpersTest.java │ │ ├── LocalizablesTest.java │ │ ├── PartitionTest.java │ │ ├── RealSumBenchmark.java │ │ ├── RealSumTest.java │ │ ├── StopWatchTest.java │ │ └── UtilTest.java │ │ └── view │ │ ├── BundleViewTest.java │ │ ├── ConcatenateViewTest.java │ │ ├── HyperSlicesViewTest.java │ │ ├── MixedTransformConcatenateTest.java │ │ ├── RandomAccessTest.java │ │ ├── RandomAccessibleIntervalCursorBenchmark.java │ │ ├── RandomAccessibleIntervalCursorTest.java │ │ ├── RotationViewTest.java │ │ ├── SequentializeTransformTest.java │ │ ├── SlicingTransformConcatenateTest.java │ │ ├── StackRandomAccessibleIntervalsTest.java │ │ ├── SubsampleIntervalViewTest.java │ │ ├── TranslationTransformConcatenateTest.java │ │ ├── ViewTransformsTest.java │ │ ├── ViewsTest.java │ │ ├── ViewsTranslateBenchmark.java │ │ ├── composite │ │ └── CompositeTest.java │ │ └── fluent │ │ ├── StreamifiedViewsExample.java │ │ └── StreamifiedViewsUseExample.java │ └── tests │ ├── BasicTest.java │ ├── BasicTests.java │ └── JUnitTestBase.java └── templates └── main └── java └── net └── imglib2 └── blocks ├── MemCopy.list └── MemCopy.vm /.github/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh 3 | sh ci-build.sh 4 | -------------------------------------------------------------------------------- /.github/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-setup-github-actions.sh 3 | sh ci-setup-github-actions.sh 4 | -------------------------------------------------------------------------------- /.github/workflows/build-main.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags: 8 | - "*-[0-9]+.*" 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Set up Java 17 | uses: actions/setup-java@v3 18 | with: 19 | java-version: '8' 20 | distribution: 'zulu' 21 | cache: 'maven' 22 | - name: Set up CI environment 23 | run: .github/setup.sh 24 | - name: Execute the build 25 | run: .github/build.sh 26 | env: 27 | GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} 28 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 29 | MAVEN_USER: ${{ secrets.MAVEN_USER }} 30 | MAVEN_PASS: ${{ secrets.MAVEN_PASS }} 31 | OSSRH_PASS: ${{ secrets.OSSRH_PASS }} 32 | SIGNING_ASC: ${{ secrets.SIGNING_ASC }} 33 | -------------------------------------------------------------------------------- /.github/workflows/build-pr.yml: -------------------------------------------------------------------------------- 1 | name: build PR 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Set up Java 15 | uses: actions/setup-java@v3 16 | with: 17 | java-version: '8' 18 | distribution: 'zulu' 19 | cache: 'maven' 20 | - name: Set up CI environment 21 | run: .github/setup.sh 22 | - name: Execute the build 23 | run: .github/build.sh 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/.classpath 2 | **/.project 3 | **/.settings 4 | **/target 5 | .DS_Store 6 | .classpath 7 | .project 8 | .settings 9 | target 10 | *.class 11 | *~ 12 | *.orig 13 | 14 | # For Fiji # 15 | *.jar 16 | 17 | # IntelliJ 18 | .idea/ 19 | *.iml 20 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Albert Cardona 2 | Albert Cardona 3 | Barry DeZonia 4 | Barry DeZonia 5 | Barry DeZonia 6 | Barry DeZonia 7 | Barry DeZonia 8 | Christian Dietz 9 | Christian Dietz 10 | Christian Dietz 11 | Christian Dietz 12 | Christian Dietz 13 | Curtis Rueden 14 | Grant Harris 15 | Jean-Yves Tinevez 16 | Jean-Yves Tinevez 17 | Johannes Schindelin 18 | Jonathan Hale 19 | Larry Lindsey 20 | Lee Kamentsky 21 | Mark Hiner 22 | Martin Horn 23 | Martin Horn 24 | Michael Zinsmaier 25 | Stefan Helfrich 26 | Stefan Helfrich 27 | Stephan Preibisch 28 | Stephan Preibisch 29 | Stephan Preibisch 30 | Stephan Preibisch 31 | Stephan Saalfeld 32 | Stephan Saalfeld 33 | Stephan Saalfeld 34 | Tobias Pietzsch 35 | Tobias Pietzsch 36 | Tobias Pietzsch 37 | Tobias Pietzsch 38 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 - 2025, Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 2 | John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 3 | Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 4 | Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 5 | Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 6 | Jean-Yves Tinevez and Michael Zinsmaier. 7 | All rights reserved. 8 | 9 | Redistribution and use in source and binary forms, with or without modification, 10 | are permitted provided that the following conditions are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright notice, this 13 | list of conditions and the following disclaimer. 14 | 15 | 2. Redistributions in binary form must reproduce the above copyright notice, 16 | this list of conditions and the following disclaimer in the documentation 17 | and/or other materials provided with the distribution. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /doc/Class Diagram Color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/Class Diagram Color.png -------------------------------------------------------------------------------- /doc/The Generic Java Image Processing Library.doc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/The Generic Java Image Processing Library.doc -------------------------------------------------------------------------------- /doc/The Generic Java Image Processing Library.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/The Generic Java Image Processing Library.pdf -------------------------------------------------------------------------------- /doc/changelog.madison.txt: -------------------------------------------------------------------------------- 1 | Stephan Saalfeld, Tobias Pietzsch, Stephan Preibisch: 2 | 3 | * redesigned ImgLib core gaining the following improvements: 4 | * separation of access to the domain and codomain (position vs. type-access) 5 | * separation of iteration and random access 6 | * separation of real and integer coordinate access 7 | * virtualization of how data sets can be accessed, thus allowing generative 8 | functions, views on virtually transformed data, unevenly sampled data, and 9 | much more 10 | * improved performance 11 | * simplified generalized display 12 | 13 | * added interactive panorama viewer as aplugin to Fiji (thanks Albert for 14 | doing the infrastructure) 15 | 16 | * added integral images as a library component to the mpicbg submodule of Fiji 17 | with the following examplary applications: 18 | * rapid mean filter 19 | * rapid averaging downscaling 20 | * rapid difference of mean filter 21 | 22 | 23 | -------------------------------------------------------------------------------- /doc/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/favicon.ico -------------------------------------------------------------------------------- /doc/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/favicon.png -------------------------------------------------------------------------------- /doc/imglib2-logo-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/imglib2-logo-header.png -------------------------------------------------------------------------------- /doc/imglib2-logo-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/imglib2-logo-icon.png -------------------------------------------------------------------------------- /doc/imglib2-logo-social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/imglib2-logo-social.png -------------------------------------------------------------------------------- /doc/imglib2-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/imglib/imglib2/fd081a3f25a80cfdcb438f416618a3a05ca55711/doc/imglib2-logo.png -------------------------------------------------------------------------------- /doc/net.imglib2.interpolation.randomaccess.LanczosInterpolator.LUT.bsh: -------------------------------------------------------------------------------- 1 | double piSquare = Math.PI * Math.PI; 2 | int preCalculationScale = 10; 3 | int a = 5; 4 | double[] sinc = new double[ a * preCalculationScale + 2 ];; 5 | 6 | int scale = 100; 7 | 8 | red = 0x00ff0000; 9 | green = 0x0000ff00; 10 | 11 | double[] preCalculateSinc( int max, int scale ) 12 | { 13 | double[] sinc = new double[ max * scale + 2 ]; 14 | for ( int i = 0; i < sinc.length; ++i ) 15 | { 16 | double x = ( double )i / ( double )preCalculationScale; 17 | sinc[ i ] = sinc( x, max ); 18 | } 19 | return sinc; 20 | } 21 | 22 | double sinc( double x, double a ) 23 | { 24 | if ( x == 0 ) 25 | return 1; 26 | else 27 | return (( a * Math.sin( Math.PI * x ) * Math.sin( Math.PI * x / a ) ) / ( piSquare * x * x )); 28 | } 29 | 30 | double sinc2( double x ) 31 | { 32 | double y = x < 0 ? -preCalculationScale * x : preCalculationScale * x; 33 | int yi = ( int )y; 34 | double d = y - yi; 35 | return ( sinc[ yi + 1 ] - sinc[ yi ] ) * d + sinc[ yi ]; 36 | } 37 | 38 | sinc = preCalculateSinc( a, preCalculationScale ); 39 | 40 | ip = new ColorProcessor( a * scale, 2 * scale ); 41 | 42 | for ( int x = 0; x < ip.getWidth(); ++x ) 43 | { 44 | v = sinc( ( double )x / scale, a ); 45 | ip.putPixel( x, scale - ( int )Math.round( v * scale ), green ); 46 | v = sinc2( ( double )x / scale ); 47 | yi = scale - ( int )Math.round( v * scale ); 48 | ip.putPixel( x, yi, ip.get( x, yi ) | red ); 49 | } 50 | 51 | new ImagePlus( "Lanczos kernel", ip ).show(); 52 | 53 | ipKernel = new ColorProcessor( 2 * a * scale, 2 * a * scale ); 54 | impKernel = new ImagePlus( "Lanczos Kernel", ipKernel ); 55 | impKernel.show(); 56 | 57 | for ( int y = 0; y < ipKernel.getHeight(); ++y ) 58 | { 59 | vSinc = sinc( ( double )y / scale - a, a ); 60 | vSinc2 = sinc2( ( double )y / scale - a ); 61 | for ( int x = 0; x < ipKernel.getWidth(); ++x ) 62 | { 63 | v = vSinc * sinc( ( double )x / scale - a, a ); 64 | rgb = ( int )Math.round( 127 + v * 127 ) << 8; 65 | v = vSinc2 * sinc2( ( double )x / scale - a ); 66 | rgb |= ( int )Math.round( 127 + v * 127 ) << 16; 67 | ipKernel.putPixel( x, y, rgb ); 68 | } 69 | impKernel.updateAndDraw(); 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/Dirty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2; 35 | 36 | /** 37 | * Interface for objects that can be flagged dirty (useful for access 38 | * objects that track if their content was modified) 39 | * 40 | * @author Stephan Saalfeld 41 | */ 42 | public interface Dirty 43 | { 44 | boolean isDirty(); 45 | 46 | void setDirty(); 47 | 48 | void setDirty( boolean dirty ); 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/EuclideanSpace.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2; 36 | 37 | /** 38 | * {Rn}: an N-dimensional Euclidean space. 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface EuclideanSpace 44 | { 45 | /** Gets the space's number of dimensions. */ 46 | int numDimensions(); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/LocalizableSampler.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2; 35 | 36 | /** 37 | * Combination of {@code Localizable} and {@code Sampler} interfaces. In 38 | * general, it is preferable to use {@code Localizable & Sampler} where 39 | * possible. 40 | * 41 | * @param pixel type 42 | */ 43 | public interface LocalizableSampler< T > extends Localizable, RealLocalizableSampler< T > 44 | { 45 | @Override 46 | LocalizableSampler< T > copy(); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/RealLocalizableSampler.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2; 35 | 36 | /** 37 | * Combination of {@code RealLocalizable} and {@code Sampler} interfaces. In 38 | * general, it is preferable to use {@code RealLocalizable & Sampler} where 39 | * possible. 40 | * 41 | * @param pixel type 42 | */ 43 | public interface RealLocalizableSampler< T > extends RealLocalizable, Sampler< T > 44 | { 45 | @Override 46 | RealLocalizableSampler< T > copy(); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/Typed.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2; 35 | 36 | public interface Typed< T > 37 | { 38 | /** 39 | * Get an instance of {@code T}. 40 | *

41 | * It should not be assumed that the returned {@code T} instance is an 42 | * independent copy. In particular, repeated calls to {@code getType()} may 43 | * return the same instance. 44 | * 45 | * @return an instance of {@code T} 46 | */ 47 | T getType(); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/Volatile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2; 36 | 37 | /** 38 | * Something volatile that has a value and is either VALID or INVALID. 39 | * 40 | * @author Stephan Saalfeld 41 | */ 42 | public class Volatile< T > 43 | { 44 | final protected T t; 45 | 46 | protected boolean valid; 47 | 48 | public Volatile( final T t, final boolean valid ) 49 | { 50 | this.t = t; 51 | this.valid = valid; 52 | } 53 | 54 | public Volatile( final T t ) 55 | { 56 | this( t, false ); 57 | } 58 | 59 | public T get() 60 | { 61 | return t; 62 | } 63 | 64 | public boolean isValid() 65 | { 66 | return valid; 67 | } 68 | 69 | public void setValid( final boolean valid ) 70 | { 71 | this.valid = valid; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ARGBDoubleARGBConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.converter; 35 | 36 | import net.imglib2.type.numeric.ARGBType; 37 | import net.imglib2.type.numeric.AbstractARGBDoubleType; 38 | 39 | /** 40 | * 41 | * 42 | * @author Stephan Saalfeld 43 | */ 44 | public class ARGBDoubleARGBConverter< T extends AbstractARGBDoubleType< ? > > implements Converter< T, ARGBType > 45 | { 46 | @Override 47 | public void convert( final T input, final ARGBType output ) 48 | { 49 | output.set( input.toARGBInt() ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/BiConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | /** 38 | * This interface would be a TriConsumer if such an interface existed in the 39 | * JDK. Its main use is for functions with two input variables and one 40 | * pre-allocated output on individual pixels. 41 | * 42 | * @author Stephan Saalfeld 43 | */ 44 | public interface BiConverter< A, B, C > 45 | { 46 | void convert( A inputA, B outputB, C output ); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ColorChannelOrder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | public enum ColorChannelOrder 38 | { 39 | ARGB( 4 ), RGB( 3 ); 40 | 41 | private final int channelCount; 42 | 43 | ColorChannelOrder( int channelCount ) 44 | { 45 | this.channelCount = channelCount; 46 | } 47 | 48 | public int channelCount() { 49 | return channelCount; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ComplexImaginaryFloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.ComplexType; 38 | import net.imglib2.type.numeric.real.FloatType; 39 | 40 | /** 41 | * Returns the imaginary value of a complex value 42 | * 43 | * @author Stephan Preibisch 44 | */ 45 | public class ComplexImaginaryFloatConverter< R extends ComplexType< R > > implements Converter< R, FloatType > 46 | { 47 | @Override 48 | public void convert( final R input, final FloatType output ) 49 | { 50 | output.set( input.getImaginaryFloat() ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ComplexPhaseFloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.ComplexType; 38 | import net.imglib2.type.numeric.real.FloatType; 39 | 40 | /** 41 | * Computes the phase spectrum for a complex value 42 | * 43 | * @author Stephan Preibisch 44 | */ 45 | public class ComplexPhaseFloatConverter< R extends ComplexType< R > > implements Converter< R, FloatType > 46 | { 47 | @Override 48 | public void convert( final R input, final FloatType output ) 49 | { 50 | output.set( input.getPhaseFloat() ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ComplexPowerFloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.ComplexType; 38 | import net.imglib2.type.numeric.real.FloatType; 39 | 40 | /** 41 | * Computes the power spectrum for a complex value 42 | * 43 | * @author Stephan Preibisch 44 | */ 45 | public class ComplexPowerFloatConverter< R extends ComplexType< R > > implements Converter< R, FloatType > 46 | { 47 | @Override 48 | public void convert( final R input, final FloatType output ) 49 | { 50 | output.set( input.getPowerFloat() ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ComplexPowerGLogFloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.ComplexType; 38 | import net.imglib2.type.numeric.real.FloatType; 39 | import net.imglib2.util.Util; 40 | 41 | /** 42 | * Computes the generalized log of the power spectrum for a complex value 43 | * 44 | * @author Stephan Preibisch 45 | */ 46 | public class ComplexPowerGLogFloatConverter< R extends ComplexType< R > > implements Converter< R, FloatType > 47 | { 48 | @Override 49 | public void convert( final R input, final FloatType output ) 50 | { 51 | output.set( Util.gLog( input.getPowerFloat(), 2 ) ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/ComplexRealFloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.ComplexType; 38 | import net.imglib2.type.numeric.real.FloatType; 39 | 40 | /** 41 | * Returns the real value for of complex value 42 | * 43 | * @author Stephan Preibisch 44 | */ 45 | public class ComplexRealFloatConverter< R extends ComplexType< R > > implements Converter< R, FloatType > 46 | { 47 | @Override 48 | public void convert( final R input, final FloatType output ) 49 | { 50 | output.set( input.getRealFloat() ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/CompositeChannelConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | /** 35 | * 36 | */ 37 | package net.imglib2.converter; 38 | 39 | import net.imglib2.type.Type; 40 | import net.imglib2.view.composite.Composite; 41 | 42 | /** 43 | * A converter to extract one channel of a {@link Composite}. 44 | * 45 | * @author Stephan Saalfeld 46 | * 47 | */ 48 | public class CompositeChannelConverter< T extends Type< T >, A extends Composite< T > > implements Converter< A, T > 49 | { 50 | final protected long i; 51 | 52 | public CompositeChannelConverter( final long i ) 53 | { 54 | this.i = i; 55 | } 56 | 57 | @Override 58 | public void convert( A input, T output ) 59 | { 60 | output.set( input.get( i ) ); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/Converter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import java.util.function.BiConsumer; 38 | 39 | /** 40 | * This interface is equivalent to the {@link BiConsumer} interface and exists 41 | * for historical reasons only. Its main use is for functions with one input 42 | * variable and one pre-allocated output on individual pixels. 43 | * 44 | * @author Stephan Preibisch 45 | * @author Stephan Saalfeld 46 | */ 47 | public interface Converter< A, B > 48 | { 49 | void convert( A input, B output ); 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/RealDoubleConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.RealType; 38 | import net.imglib2.type.numeric.real.DoubleType; 39 | 40 | /** 41 | * Converts any {@link RealType} to a {@link DoubleType}. 42 | * 43 | * If the input type is complex, it loses the imaginary part without complaining 44 | * further. 45 | * 46 | * @author Johannes Schindelin 47 | */ 48 | public class RealDoubleConverter< R extends RealType< R > > implements Converter< R, DoubleType > 49 | { 50 | @Override 51 | public void convert( final R input, final DoubleType output ) 52 | { 53 | output.set( input.getRealDouble() ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/RealFloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.numeric.RealType; 38 | import net.imglib2.type.numeric.real.FloatType; 39 | 40 | /** 41 | * 42 | * 43 | * @author Stephan Saalfeld 44 | * @author Stephan Preibisch 45 | */ 46 | public class RealFloatConverter< R extends RealType< R > > implements Converter< R, FloatType > 47 | { 48 | @Override 49 | public void convert( final R input, final FloatType output ) 50 | { 51 | output.set( input.getRealFloat() ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/converter/TypeIdentity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.converter; 36 | 37 | import net.imglib2.type.Type; 38 | 39 | /** 40 | * TODO 41 | * 42 | * @author Stephan Preibisch 43 | */ 44 | public class TypeIdentity< T extends Type< T > > implements Converter< T, T > 45 | { 46 | @Override 47 | public void convert( final T input, final T output ) 48 | { 49 | output.set( input ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/display/ColorConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.display; 35 | 36 | import net.imglib2.type.numeric.ARGBType; 37 | 38 | /** 39 | * Allows to set a target color for a {@code Converter}, in addition to min/max 40 | * of the source {@link LinearRange linear range}. 41 | *

42 | * (This is used in BigDataViewer to tie converter configuration into the UI.) 43 | */ 44 | public interface ColorConverter extends LinearRange 45 | { 46 | ARGBType getColor(); 47 | 48 | void setColor( final ARGBType c ); 49 | 50 | boolean supportsColor(); 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/display/LinearRange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.display; 36 | 37 | /** 38 | * 39 | * 40 | * @author Stephan Saalfeld 41 | */ 42 | public interface LinearRange 43 | { 44 | double getMin(); 45 | 46 | double getMax(); 47 | 48 | void setMin( double min ); 49 | 50 | void setMax( double max ); 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/display/projector/Projector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.display.projector; 36 | 37 | /** 38 | * 39 | * 40 | * @author Stephan Saalfeld 41 | */ 42 | public interface Projector 43 | { 44 | void map(); 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/display/screenimage/ScreenImage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.display.screenimage; 36 | 37 | /** 38 | * Toplevel interface for screen images. 39 | * 40 | * @param 41 | * The type of images this screen image produces. 42 | * 43 | * @author Curtis Rueden 44 | * @author Christian Dietz 45 | */ 46 | public interface ScreenImage< T > 47 | { 48 | T image(); 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/display/screenimage/awt/AWTScreenImage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.display.screenimage.awt; 36 | 37 | import java.awt.Image; 38 | 39 | import net.imglib2.display.screenimage.ScreenImage; 40 | 41 | /** 42 | * A {@link ScreenImage} that produces AWT {@link Image} objects. 43 | * 44 | * @author Stephan Saalfeld 45 | */ 46 | public interface AWTScreenImage extends ScreenImage< Image > 47 | { 48 | 49 | @Override 50 | Image image(); 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/exception/ImgLibException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.exception; 36 | 37 | /** 38 | * @author Curtis Rueden 39 | * @author Stephan Preibisch 40 | */ 41 | public class ImgLibException extends RuntimeException 42 | { 43 | public ImgLibException( final String message ) 44 | { 45 | super( message ); 46 | } 47 | 48 | public ImgLibException( final Object obj, final String message ) 49 | { 50 | super( obj.getClass().getCanonicalName() + ": " + message ); 51 | } 52 | 53 | public ImgLibException() 54 | { 55 | super(); 56 | } 57 | 58 | public ImgLibException( final Throwable t ) 59 | { 60 | super( t ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/exception/IncompatibleTypeException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.exception; 36 | 37 | import net.imglib2.type.Type; 38 | 39 | /** 40 | * Is thrown if a {@link Type} is not supported. 41 | * 42 | * @author Curtis Rueden 43 | * @author Stephan Preibisch 44 | * @author Johannes Schindelin 45 | */ 46 | public class IncompatibleTypeException extends ImgLibException 47 | { 48 | public IncompatibleTypeException( final Object obj, final String message ) 49 | { 50 | super( obj.getClass().getCanonicalName() + ": " + message ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/exception/InvalidDimensionsException.java: -------------------------------------------------------------------------------- 1 | /*- 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.exception; 35 | 36 | import net.imglib2.util.Util; 37 | 38 | public class InvalidDimensionsException extends IllegalArgumentException 39 | { 40 | private final long[] dimensions; 41 | 42 | public InvalidDimensionsException( final long[] dimensions, final String message ) 43 | { 44 | super( message ); 45 | this.dimensions = dimensions.clone(); 46 | } 47 | 48 | public InvalidDimensionsException( final int[] dimensions, final String message ) 49 | { 50 | this( Util.int2long( dimensions ), message ); 51 | } 52 | 53 | public long[] getDimenionsCopy() 54 | { 55 | return this.dimensions.clone(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/WrappedImg.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img; 36 | 37 | /** 38 | * An object that wraps an {@link Img} somehow. 39 | * 40 | * @author Christian Dietz 41 | */ 42 | public interface WrappedImg< T > 43 | { 44 | Img< T > getImg(); 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/BooleanAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Curtis Rueden 41 | */ 42 | public interface BooleanAccess extends DataAccess 43 | { 44 | boolean getValue( int index ); 45 | 46 | void setValue( int index, boolean value ); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/ByteAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface ByteAccess extends DataAccess 44 | { 45 | byte getValue( int index ); 46 | 47 | void setValue( int index, byte value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/CharAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface CharAccess extends DataAccess 44 | { 45 | char getValue( int index ); 46 | 47 | void setValue( int index, char value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/DoubleAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface DoubleAccess extends DataAccess 44 | { 45 | double getValue( int index ); 46 | 47 | void setValue( int index, double value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/FloatAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface FloatAccess extends DataAccess 44 | { 45 | float getValue( int index ); 46 | 47 | void setValue( int index, float value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/IntAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface IntAccess extends DataAccess 44 | { 45 | int getValue( int index ); 46 | 47 | void setValue( int index, int value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/LongAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface LongAccess extends DataAccess 44 | { 45 | long getValue( int index ); 46 | 47 | void setValue( int index, long value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/PlanarAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * Interface allowing access to data on a plane-by-plane basis. 39 | * 40 | * @param 41 | * primitive array type 42 | * @author Curtis Rueden 43 | */ 44 | public interface PlanarAccess< A > extends DataAccess 45 | { 46 | A getPlane( int no ); 47 | 48 | void setPlane( int no, A plane ); 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/ShortAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface ShortAccess extends DataAccess 44 | { 45 | short getValue( int index ); 46 | 47 | void setValue( int index, short value ); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/ArrayDataAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | import java.io.Serializable; 38 | 39 | import net.imglib2.img.basictypeaccess.DataAccess; 40 | 41 | /** 42 | * Trivial interface for primitive array based data access implementations 43 | * that can replicate themselves and return the underlying array. 44 | * 45 | * @author Stephan Preibisch 46 | * @author Stephan Saalfeld 47 | */ 48 | public interface ArrayDataAccess< A > extends DataAccess, Serializable 49 | { 50 | A createArray( int numEntities ); 51 | 52 | Object getCurrentStorageArray(); 53 | 54 | int getArrayLength(); 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/BooleanArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * 39 | * @author Curtis Rueden 40 | */ 41 | public class BooleanArray extends AbstractBooleanArray< BooleanArray > 42 | { 43 | public BooleanArray( final int numEntities ) 44 | { 45 | super( numEntities ); 46 | } 47 | 48 | public BooleanArray( final boolean[] data ) 49 | { 50 | super( data ); 51 | } 52 | 53 | @Override 54 | public BooleanArray createArray( final int numEntities ) 55 | { 56 | return new BooleanArray( numEntities ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/ByteArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * 39 | * @author Stephan Preibisch 40 | * @author Stephan Saalfeld 41 | */ 42 | public class ByteArray extends AbstractByteArray< ByteArray > 43 | { 44 | public ByteArray( final int numEntities ) 45 | { 46 | super( numEntities ); 47 | } 48 | 49 | public ByteArray( final byte[] data ) 50 | { 51 | super( data ); 52 | } 53 | 54 | @Override 55 | public ByteArray createArray( final int numEntities ) 56 | { 57 | return new ByteArray( numEntities ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/CharArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * 39 | * @author Stephan Preibisch 40 | * @author Stephan Saalfeld 41 | */ 42 | public class CharArray extends AbstractCharArray< CharArray > 43 | { 44 | public CharArray( final int numEntities ) 45 | { 46 | super( numEntities ); 47 | } 48 | 49 | public CharArray( final char[] data ) 50 | { 51 | super( data ); 52 | } 53 | 54 | @Override 55 | public CharArray createArray( final int numEntities ) 56 | { 57 | return new CharArray( numEntities ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/DoubleArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public class DoubleArray extends AbstractDoubleArray< DoubleArray > 44 | { 45 | public DoubleArray( final int numEntities ) 46 | { 47 | super( numEntities ); 48 | } 49 | 50 | public DoubleArray( final double[] data ) 51 | { 52 | super( data ); 53 | } 54 | 55 | @Override 56 | public DoubleArray createArray( final int numEntities ) 57 | { 58 | return new DoubleArray( numEntities ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/FloatArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public class FloatArray extends AbstractFloatArray< FloatArray > 44 | { 45 | public FloatArray( final int numEntities ) 46 | { 47 | super( numEntities ); 48 | } 49 | 50 | public FloatArray( final float[] data ) 51 | { 52 | super( data ); 53 | } 54 | 55 | @Override 56 | public FloatArray createArray( final int numEntities ) 57 | { 58 | return new FloatArray( numEntities ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/IntArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * 39 | * @author Stephan Preibisch 40 | * @author Stephan Saalfeld 41 | */ 42 | public class IntArray extends AbstractIntArray< IntArray > 43 | { 44 | protected int data[]; 45 | 46 | public IntArray( final int numEntities ) 47 | { 48 | super( numEntities ); 49 | } 50 | 51 | public IntArray( final int[] data ) 52 | { 53 | super( data ); 54 | } 55 | 56 | @Override 57 | public IntArray createArray( final int numEntities ) 58 | { 59 | return new IntArray( numEntities ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/LongArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * 39 | * @author Stephan Preibisch 40 | * @author Stephan Saalfeld 41 | */ 42 | public class LongArray extends AbstractLongArray< LongArray > 43 | { 44 | public LongArray( final int numEntities ) 45 | { 46 | super( numEntities ); 47 | } 48 | 49 | public LongArray( final long[] data ) 50 | { 51 | super( data ); 52 | } 53 | 54 | @Override 55 | public LongArray createArray( final int numEntities ) 56 | { 57 | return new LongArray( numEntities ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/array/ShortArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.basictypeaccess.array; 36 | 37 | /** 38 | * 39 | * @author Stephan Preibisch 40 | * @author Stephan Saalfeld 41 | */ 42 | public class ShortArray extends AbstractShortArray< ShortArray > 43 | { 44 | protected short data[]; 45 | 46 | public ShortArray( final int numEntities ) 47 | { 48 | super( numEntities ); 49 | } 50 | 51 | public ShortArray( final short[] data ) 52 | { 53 | super( data ); 54 | } 55 | 56 | @Override 57 | public ShortArray createArray( final int numEntities ) 58 | { 59 | return new ShortArray( numEntities ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | /** 37 | * A basic type access that can contain valid or invalid data. 38 | * 39 | * @author Tobias Pietzsch <tobias.pietzsch@gmail.com> 40 | */ 41 | public interface VolatileAccess 42 | { 43 | boolean isValid(); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileArrayDataAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.array.ArrayDataAccess; 37 | 38 | /** 39 | * An {@link ArrayDataAccess} that can contain valid or invalid data. 40 | * 41 | * @author Tobias Pietzsch 42 | */ 43 | public interface VolatileArrayDataAccess< A > extends ArrayDataAccess< A >, VolatileAccess 44 | { 45 | A createArray( int numEntities, boolean isValid ); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileBooleanAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.BooleanAccess; 37 | 38 | 39 | /** 40 | * @author Curtis Rueden 41 | */ 42 | public interface VolatileBooleanAccess extends BooleanAccess, VolatileAccess 43 | {} 44 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileByteAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.ByteAccess; 37 | 38 | 39 | /** 40 | * @author Stephan Saalfeld 41 | * @author Tobias Pietzsch 42 | */ 43 | public interface VolatileByteAccess extends ByteAccess, VolatileAccess 44 | {} 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileCharAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.CharAccess; 37 | 38 | 39 | /** 40 | * @author Stephan Saalfeld 41 | * @author Tobias Pietzsch 42 | */ 43 | public interface VolatileCharAccess extends CharAccess, VolatileAccess 44 | {} 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileDoubleAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.DoubleAccess; 37 | 38 | 39 | /** 40 | * @author Stephan Saalfeld 41 | * @author Tobias Pietzsch 42 | */ 43 | public interface VolatileDoubleAccess extends DoubleAccess, VolatileAccess 44 | {} 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileFloatAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.FloatAccess; 37 | 38 | /** 39 | * @author Tobias Pietzsch 40 | */ 41 | public interface VolatileFloatAccess extends FloatAccess, VolatileAccess 42 | {} 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileIntAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.IntAccess; 37 | 38 | /** 39 | * @author Stephan Saalfeld 40 | * @author Tobias Pietzsch 41 | */ 42 | public interface VolatileIntAccess extends IntAccess, VolatileAccess 43 | {} 44 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileLongAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.LongAccess; 37 | 38 | /** 39 | * @author Stephan Saalfeld 40 | * @author Tobias Pietzsch 41 | */ 42 | public interface VolatileLongAccess extends LongAccess, VolatileAccess 43 | {} 44 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/basictypeaccess/volatiles/VolatileShortAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.img.basictypeaccess.volatiles; 35 | 36 | import net.imglib2.img.basictypeaccess.ShortAccess; 37 | 38 | /** 39 | * @author Tobias Pietzsch 40 | */ 41 | public interface VolatileShortAccess extends ShortAccess, VolatileAccess 42 | {} 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/img/sparse/NtreeAccess.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.img.sparse; 36 | 37 | import net.imglib2.img.basictypeaccess.DataAccess; 38 | import net.imglib2.img.sparse.NtreeImg.PositionProvider; 39 | 40 | public interface NtreeAccess< L extends Comparable< L >, A extends NtreeAccess< L, A > > extends DataAccess 41 | { 42 | 43 | Ntree< L > getCurrentStorageNtree(); 44 | 45 | A createInstance( long[] pos ); 46 | 47 | @Override 48 | default A createView( final Object updater ) 49 | { 50 | return createInstance( ( ( PositionProvider ) updater ).getPosition() ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/interpolation/InterpolatorFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.interpolation; 36 | 37 | import net.imglib2.RealInterval; 38 | import net.imglib2.RealRandomAccess; 39 | 40 | /** 41 | * @param 42 | * Type of values provided by the interpolator. 43 | * @param 44 | * Type of function, which the interpolator operates on. 45 | * @author Stephan Preibisch 46 | * @author Stephan Saalfeld 47 | * @author Tobias Pietzsch 48 | */ 49 | public interface InterpolatorFactory< T, F > 50 | { 51 | RealRandomAccess< T > create( F f ); 52 | 53 | RealRandomAccess< T > create( F f, RealInterval interval ); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/Bounded.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.outofbounds; 36 | 37 | import net.imglib2.Localizable; 38 | import net.imglib2.Positionable; 39 | import net.imglib2.Sampler; 40 | 41 | /** 42 | * Interface implemented by entities ({@link Sampler}s, {@link Positionable}s, 43 | * {@link Localizable}s) that can tell whether they are currently located 44 | * outside of the image boundaries. 45 | * 46 | * @author Tobias Pietzsch 47 | * @author Stephan Preibisch 48 | * @author Stephan Saalfeld 49 | */ 50 | public interface Bounded 51 | { 52 | /** True if located out of image bounds. */ 53 | boolean isOutOfBounds(); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/OutOfBounds.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.outofbounds; 36 | 37 | import net.imglib2.RandomAccess; 38 | 39 | /** 40 | * 41 | * 42 | * @author Stephan Saalfeld 43 | */ 44 | public interface OutOfBounds< T > extends RandomAccess< T >, Bounded 45 | { 46 | @Override 47 | OutOfBounds< T > copy(); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/OutOfBoundsBorderFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.outofbounds; 35 | 36 | import net.imglib2.Interval; 37 | import net.imglib2.RandomAccessible; 38 | 39 | /** 40 | * Strategy to repeat the boundary pixels (creates {@link OutOfBoundsBorder}). 41 | * 42 | * @author Tobias Pietzsch 43 | */ 44 | public class OutOfBoundsBorderFactory< T, F extends Interval & RandomAccessible< T > > implements OutOfBoundsFactory< T, F > 45 | { 46 | @Override 47 | public OutOfBoundsBorder< T > create( final F f ) 48 | { 49 | return new OutOfBoundsBorder< T >( f ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/OutOfBoundsFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.outofbounds; 36 | 37 | /** 38 | * 39 | * @param 40 | * @param 41 | * 42 | * @author Stephan Saalfeld 43 | */ 44 | public interface OutOfBoundsFactory< T, F > 45 | { 46 | OutOfBounds< T > create( F f ); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/OutOfBoundsPeriodicFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.outofbounds; 36 | 37 | import net.imglib2.Interval; 38 | import net.imglib2.RandomAccessible; 39 | import net.imglib2.RandomAccessibleInterval; 40 | 41 | /** 42 | * Create appropriate strategies that virtually extend a 43 | * {@link RandomAccessibleInterval} periodically. 44 | * 45 | * @author Stephan Preibisch 46 | * @author Stephan Saalfeld 47 | */ 48 | public class OutOfBoundsPeriodicFactory< T, F extends Interval & RandomAccessible< T > > implements OutOfBoundsFactory< T, F > 49 | { 50 | @Override 51 | public OutOfBoundsPeriodic< T > create( final F f ) 52 | { 53 | return new OutOfBoundsPeriodic< T >( f ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/RealOutOfBounds.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.outofbounds; 36 | 37 | import net.imglib2.RealRandomAccess; 38 | 39 | /** 40 | * 41 | * @param 42 | * 43 | * @author Stephan Saalfeld 44 | */ 45 | public interface RealOutOfBounds< T > extends OutOfBounds< T >, RealRandomAccess< T > 46 | { 47 | @Override 48 | RealOutOfBounds< T > copy(); 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/outofbounds/RealOutOfBoundsFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.outofbounds; 36 | 37 | /** 38 | * 39 | * @param 40 | * @param 41 | * 42 | * @author Stephan Saalfeld 43 | */ 44 | public interface RealOutOfBoundsFactory< T, F > 45 | { 46 | RealOutOfBounds< T > create( F f ); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/transform/integer/BoundingBoxTransform.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.transform.integer; 36 | 37 | /** 38 | * Implemented by Transforms that can transform (easily) a BoundingBox in the 39 | * source space to a bounding box in the target space. 40 | * 41 | * 42 | * @author Tobias Pietzsch 43 | */ 44 | public interface BoundingBoxTransform 45 | { 46 | /** 47 | * Return a transformed bounding box. The transformation can be carried out 48 | * in-place. 49 | * 50 | * @param boundingBox 51 | * @return the transformed bounding box 52 | */ 53 | BoundingBox transform( BoundingBox boundingBox ); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/transform/integer/Slicing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.transform.integer; 36 | 37 | /** 38 | * TODO 39 | * 40 | */ 41 | public interface Slicing extends Mixed 42 | {} 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/transform/integer/Translation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.transform.integer; 36 | 37 | import net.imglib2.transform.InvertibleTransform; 38 | 39 | /** 40 | * TODO 41 | * 42 | */ 43 | public interface Translation extends Mixed, InvertibleTransform 44 | {} 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/AbstractNativeType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.type; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public abstract class AbstractNativeType< T extends AbstractNativeType< T >> implements NativeType< T > 44 | { 45 | protected final Index i; 46 | 47 | protected AbstractNativeType() 48 | { 49 | i = new Index(); 50 | } 51 | 52 | @Override 53 | public Index index() 54 | { 55 | return i; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/BasePairType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.type; 36 | 37 | import net.imglib2.type.label.BasePairBitType.Base; 38 | 39 | /** 40 | * TODO 41 | * 42 | * @author Stephan Preibisch 43 | * @author Stephan Saalfeld 44 | */ 45 | public interface BasePairType< T extends BasePairType< T >> extends Type< T >, Comparable< T > 46 | { 47 | void set( Base base ); 48 | 49 | Base get(); 50 | 51 | void complement(); 52 | 53 | byte baseToValue(); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/BooleanType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.type; 36 | 37 | import net.imglib2.type.numeric.RealType; 38 | 39 | /** 40 | * TODO 41 | * 42 | * @author Stephan Preibisch 43 | * @author Stephan Saalfeld 44 | */ 45 | public interface BooleanType< T extends BooleanType< T > > extends Type< T >, RealType< T > 46 | { 47 | boolean get(); 48 | 49 | void set( boolean value ); 50 | 51 | void and( T c ); 52 | 53 | void or( T c ); 54 | 55 | void xor( T c ); 56 | 57 | void not(); 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/numeric/IntegerType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.type.numeric; 36 | 37 | import java.math.BigInteger; 38 | 39 | /** 40 | * TODO 41 | * 42 | */ 43 | public interface IntegerType< T extends IntegerType< T >> extends RealType< T > 44 | { 45 | int getInteger(); 46 | 47 | long getIntegerLong(); 48 | 49 | BigInteger getBigInteger(); 50 | 51 | void setInteger( int f ); 52 | 53 | void setInteger( long f ); 54 | 55 | void setBigInteger( BigInteger b ); 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/numeric/RealType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.type.numeric; 36 | 37 | /** 38 | * TODO 39 | * 40 | * @author Stephan Preibisch 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface RealType< T extends RealType< T >> extends ComplexType< T >, Comparable< T > 44 | { 45 | void inc(); 46 | 47 | void dec(); 48 | 49 | double getMaxValue(); 50 | 51 | double getMinValue(); 52 | 53 | double getMinIncrement(); 54 | 55 | int getBitsPerPixel(); 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/Add.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | * 39 | * @param 40 | */ 41 | public interface Add< T > 42 | { 43 | void add( T c ); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/Div.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | * 39 | * @param 40 | */ 41 | public interface Div< T > 42 | { 43 | void div( T c ); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/Mul.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | * 39 | * @param 40 | */ 41 | public interface Mul< T > 42 | { 43 | void mul( T c ); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/MulFloatingPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | */ 39 | public interface MulFloatingPoint 40 | { 41 | void mul( float c ); 42 | void mul( double c ); 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/Pow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Albert Cardona 38 | * 39 | * @param 40 | */ 41 | public interface Pow< T > 42 | { 43 | void pow( T c ); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/PowFloatingPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Albert Cardona 38 | */ 39 | public interface PowFloatingPoint 40 | { 41 | void pow( double d ); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/SetOne.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | */ 39 | public interface SetOne 40 | { 41 | void setOne(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/SetZero.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | */ 39 | public interface SetZero 40 | { 41 | void setZero(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/Sub.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * @author Stephan Preibisch 38 | * 39 | * @param 40 | */ 41 | public interface Sub< T > 42 | { 43 | void sub( T c ); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/type/operators/ValueEquals.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.type.operators; 35 | 36 | /** 37 | * Tests equivalency of values. This is related to 38 | * {@link Object#equals(Object)} but for typed parameters, without reference 39 | * equality, and without side effects in the JDK when done otherwise. 40 | * 41 | * @author Stephan Saalfeld 42 | */ 43 | public interface ValueEquals< T > 44 | { 45 | boolean valueEquals( T t ); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/util/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2.util; 36 | 37 | public interface Pair< A, B > 38 | { 39 | A getA(); 40 | 41 | B getB(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/view/composite/Composite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.view.composite; 35 | 36 | /** 37 | * A {@link Composite} is a vector of scalars T. 38 | * 39 | * @author Stephan Saalfeld 40 | */ 41 | public interface Composite< T > 42 | { 43 | /** 44 | * Get the ith scalar value of the {@link Composite}. 45 | * 46 | * @param i 47 | * @return 48 | */ 49 | T get( long i ); 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/view/composite/CompositeFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.view.composite; 35 | 36 | import net.imglib2.RandomAccess; 37 | 38 | /** 39 | * A factory to create a {@link Composite} vector of scalars T given a 40 | * {@link RandomAccess}. 41 | * 42 | * @author Stephan Saalfeld 43 | */ 44 | public interface CompositeFactory< T, C extends Composite< T > > 45 | { 46 | C create( RandomAccess< T > sourceAccess ); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/net/imglib2/view/composite/GenericComposite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | package net.imglib2.view.composite; 35 | 36 | import net.imglib2.RandomAccess; 37 | 38 | /** 39 | * A generic vector of scalars T. 40 | * 41 | * @author Stephan Saalfeld 42 | */ 43 | public class GenericComposite< T > extends AbstractComposite< T > 44 | { 45 | static public class Factory< T > implements CompositeFactory< T, GenericComposite< T > > 46 | { 47 | @Override 48 | public GenericComposite< T > create( final RandomAccess< T > sourceAccess ) 49 | { 50 | return new GenericComposite< T >( sourceAccess ); 51 | } 52 | 53 | } 54 | 55 | public GenericComposite( final RandomAccess< T > sourceAccess ) 56 | { 57 | super( sourceAccess ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/test/java/net/imglib2/RandomAccessibleIntervalTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * #%L 3 | * ImgLib2: a general-purpose, multidimensional image processing library. 4 | * %% 5 | * Copyright (C) 2009 - 2025 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, 6 | * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, 7 | * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, 8 | * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, 9 | * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, 10 | * Jean-Yves Tinevez and Michael Zinsmaier. 11 | * %% 12 | * Redistribution and use in source and binary forms, with or without 13 | * modification, are permitted provided that the following conditions are met: 14 | * 15 | * 1. Redistributions of source code must retain the above copyright notice, 16 | * this list of conditions and the following disclaimer. 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, 18 | * this list of conditions and the following disclaimer in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE 25 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 | * POSSIBILITY OF SUCH DAMAGE. 32 | * #L% 33 | */ 34 | 35 | package net.imglib2; 36 | 37 | import net.imglib2.img.array.ArrayImgs; 38 | import net.imglib2.type.numeric.integer.ByteType; 39 | import org.junit.Test; 40 | 41 | import static org.junit.Assert.assertEquals; 42 | 43 | /** 44 | * Tests {@link RandomAccessibleInterval}. 45 | * 46 | * @author Philipp Hanslovsky 47 | */ 48 | public class RandomAccessibleIntervalTest 49 | { 50 | 51 | @Test 52 | public void testGetType() 53 | { 54 | // setup 55 | final RandomAccessibleInterval< ? > rai = ArrayImgs.bytes( 1 ); 56 | // process & test 57 | assertEquals( ByteType.class, rai.getType().getClass() ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /templates/main/java/net/imglib2/blocks/MemCopy.list: -------------------------------------------------------------------------------- 1 | [MemCopy.java] 2 | 3 | --------------------------------------------------------------------------------