/** * This inverse FFT can be only done in place, if desired. All parameters need to be set using the set() methods of this class. * * @param fftImage - the input as {@link Img} * @param type - a Type instance for the output */ public InverseFourierTransform( final Img<S> fftImage, final T type ) throws IncompatibleTypeException { this( fftImage, fftImage.factory().imgFactory( type ), type, Rearrangement.REARRANGE_QUADRANTS, true, false, null, null ); }
/** Makes an image that has same type, container, and dimensions as refImage. */ private static <T extends RealType<T>> ImgPlus<T> createBlankCopy( final ImgPlus<T> img) { final long[] dimensions = new long[img.numDimensions()]; img.dimensions(dimensions); final Img<T> blankImg = img.factory().create(dimensions, img.firstElement()); return new ImgPlus<T>(blankImg, img); }
@Override public int numDimensions() { return counts.numDimensions(); }
@Override public ImgFactory< LongType > factory() { return counts.factory(); }
@Override public long size() { return counts.size(); }
@Override public void min( final long[] min ) { counts.min( min ); }
@Override public void max( final long[] max ) { counts.max( max ); }
@Override public void realMin( final double[] min ) { counts.realMin( min ); }
@Override public void realMax( final RealPositionable max ) { counts.realMax( max ); }
@Override public Iterator< LongType > iterator() { return counts.iterator(); }
@Override public void updateContainer( final Object c ) { dataAccess = img.update( c ); }
@SuppressWarnings( "unchecked" ) public static < T extends NumericType< T > & NativeType< T > > ImagePlusImg< T, ? > wrap( final ImagePlus imp ) { return ( ImagePlusImg< T, ? > ) wrapLocal( imp ); }
/** * Wraps an IJ {@link ImagePlus} in an imglib2 {@link ImgPlus}, without * parameterized types. The only way I have found to beat javac constraints * on bounded multiple wildcard. */ @SuppressWarnings( "rawtypes" ) public static final ImgPlus rawWraps( final ImagePlus imp ) { final ImgPlus< DoubleType > img = ImagePlusAdapter.wrapImgPlus( imp ); final ImgPlus raw = img; return raw; }
public FourierTransform( final Img<T> input, final S complexType ) throws IncompatibleTypeException { this ( input, input.factory().imgFactory( complexType ), complexType, PreProcessing.EXTEND_MIRROR_FADING, Rearrangement.REARRANGE_QUADRANTS, FFTOptimization.SPEED, 0.25f, 0.25f, 12 ); }
/** * Instantiate a 2D gaussian peak fitter that will operate on the given image. * It is important that the image has a 0 background for this class to * operate properly. */ public GaussianPeakFitterND(final Img<T> image) { this.image = image; this.ndims = image.numDimensions(); }
@Override public void min( final Positionable min ) { counts.min( min ); }
@Override public void updateContainer( final Object c ) { dataAccess = img.update( c ); }
/** * This inverse FFT can be only done in place, if desired. All parameters need to be set using the set() methods of this class. * * @param fftImage - the input as {@link Img} * @param type - a Type instance for the output */ public InverseFourierTransform( final Img<S> fftImage, final T type ) throws IncompatibleTypeException { this( fftImage, fftImage.factory().imgFactory( type ), type, Rearrangement.REARRANGE_QUADRANTS, true, false, null, null ); }
@Override public long min( final int d ) { return counts.min( d ); }
public FourierTransform( final Img<T> input, final S complexType ) throws IncompatibleTypeException { this ( input, input.factory().imgFactory( complexType ), complexType, PreProcessing.EXTEND_MIRROR_FADING, Rearrangement.REARRANGE_QUADRANTS, FFTOptimization.SPEED, 0.25f, 0.25f, 12 ); }