Tabnine Logo
ComplexType
Code IndexAdd Tabnine to your IDE (free)

How to use
ComplexType
in
net.imglib2.type.numeric

Best Java code snippets using net.imglib2.type.numeric.ComplexType (Showing top 20 results out of 315)

origin: imagej/imagej-ops

@Override
public void compute(final C input, final ComplexFloatType output) {
  output.set(input.getRealFloat(), input.getImaginaryFloat());
}
origin: net.imglib2/imglib2-ops

@Override
public O compute(I1 z1, I2 z2, O output) {
  double x = z1.getRealDouble() - z2.getRealDouble();
  double y = z1.getImaginaryDouble() - z2.getImaginaryDouble();
  output.setComplexNumber(x, y);
  return output;
}
origin: net.imagej/imagej-deprecated

@Override
public O compute(I z, O output) {
  output.setReal(z.getRealDouble());
  output.setImaginary(z.getImaginaryDouble());
  return output;
}
origin: net.imagej/imagej-deprecated

@Override
public boolean holds(T val1, U val2) {
  return (val1.getRealDouble() != val2.getRealDouble()) ||
      (val1.getImaginaryDouble() != val2.getImaginaryDouble());
}
origin: net.imglib2/imglib2-algorithm-fft

  final int j = i * 2;
  tempIn[j] = randomAccess.get().getRealFloat();
  tempIn[j + 1] = randomAccess.get().getImaginaryFloat();
  randomAccess.fwd(dim);
tempIn[max2] = randomAccess.get().getRealFloat();
tempIn[max2 + 1] = randomAccess.get().getImaginaryFloat();
    final int j = i * 2;
    randomAccess.get().setComplexNumber(tempOut[j] / size,
      tempOut[j + 1] / size);
    randomAccess.fwd(dim);
  randomAccess.get().setComplexNumber(tempOut[max2] / size,
    tempOut[max2 + 1] / size);
    final int j = i * 2;
    randomAccess.get().setComplexNumber(tempOut[j], tempOut[j + 1]);
    randomAccess.fwd(dim);
  randomAccess.get().setComplexNumber(tempOut[max2], tempOut[max2 + 1]);
origin: net.imagej/imagej-deprecated

@Override
public C compute(T input1, V input2, C output) {
    output.setReal(input1.getRealDouble());
    output.setImaginary(input2.getRealDouble());
    return output;
}
origin: net.imglib2/imglib2-ops

@Override
public void evaluate(long[] coordinate,
  SubInterval<T> interval, ComplexType<?> output)
{
  double sum = 0;
  long numElem = 0;
  Cursor<RealType<?>> cursor = null;
  // DOES NOT COMPILE HERE
  //cursor = interval.cursor();  // probably need RegionIndexIterator idea instead
  while (cursor.hasNext()) {
    sum += cursor.get().getRealDouble();
    numElem++;
  }
  if (numElem == 0)
    output.setReal(0);
  else
    output.setReal(sum/numElem);
}

origin: net.imglib2/imglib2-ops

  @Override
  public C createOutput() {
    return cType.createVariable();
  }
}
origin: net.imglib2/imglib2-ops

@Override
public ComplexType<?> compute(RealType<?> x, ComplexType<?> output) {
  output.setComplexNumber(0, x.getRealDouble());
  return output;
}
origin: imagej/imagej-ops

@Override
public void compute(final T input1, final T input2, final T output) {
  T temp = input2.copy();
  temp.complexConjugate();
  temp.mul(input1);
  output.set(temp);
}
origin: net.imglib2/imglib2-ij

  @Override
  public void convert(final T input, final FloatType output) {
    output.setReal( input.getRealFloat() );
  }        
}
origin: net.imagej/imagej-deprecated

public ComplexConstantFunction(C c) {
  complex = c.copy();
}

origin: imglib/imglib2

  @Override
  public void convert( final R input, final FloatType output )
  {
    output.set( input.getImaginaryFloat() );
  }
}
origin: net.imglib2/imglib2-ops

@Override
public RealType<?> compute(ComplexType<?> input, RealType<?> output) {
  output.setReal(input.getRealDouble());
  return output;
}
origin: net.imagej/imagej-deprecated

@Override
public RealType<?> compute(ComplexType<?> input, RealType<?> output) {
  output.setReal(input.getImaginaryDouble());
  return output;
}
origin: net.imglib2/imglib2-ops

@Override
public void compute(INPUT input, C c) {
  c.set(complex);
}

origin: net.imglib2/imglib2-algorithms-gpl

  tempIn[ j ] = randomAccess.get().getRealFloat();
  tempIn[ j + 1 ] = randomAccess.get().getImaginaryFloat();
  randomAccess.fwd( dim );
tempIn[ max2 ] = randomAccess.get().getRealFloat();
tempIn[ max2 + 1 ] = randomAccess.get().getImaginaryFloat();
    randomAccess.get().setComplexNumber( tempOut[ j ] / size, tempOut[ j + 1 ] / size );
    randomAccess.fwd( dim );
  randomAccess.get().setComplexNumber( tempOut[ max2 ] / size, tempOut[ max2 + 1 ] / size );			
    randomAccess.get().setComplexNumber( tempOut[ j ], tempOut[ j + 1 ] );
    randomAccess.fwd( dim );
  randomAccess.get().setComplexNumber( tempOut[ max2 ], tempOut[ max2 + 1 ] );
origin: net.imagej/imagej-deprecated

/**
 * Gets the square of the modulus (magnitude, radius, r, etc.) of a given
 * complex number
 */
public static double getModulus2(ComplexType<?> z) {
  return
    z.getRealDouble()*z.getRealDouble() +
    z.getImaginaryDouble()*z.getImaginaryDouble();
}

origin: net.imglib2/imglib2-ops

@Override
public C compute(T input1, V input2, C output) {
    output.setReal(input1.getRealDouble());
    output.setImaginary(input2.getRealDouble());
    return output;
}
origin: net.imglib2/imglib2-algorithm

  @Override
  public void compute( final Composite< T > tensor, final Composite< U > evs )
  {
    evs.get( 0 ).setReal( tensor.get( 0 ).getRealDouble() );
  }
}
net.imglib2.type.numericComplexType

Javadoc

TODO

Most used methods

  • getRealFloat
  • setComplexNumber
  • getImaginaryFloat
  • getRealDouble
  • setReal
  • copy
  • createVariable
  • getImaginaryDouble
  • set
  • setImaginary
  • complexConjugate
  • getPhaseDouble
  • complexConjugate,
  • getPhaseDouble,
  • getPowerDouble,
  • setZero,
  • getPhaseFloat,
  • getPowerFloat,
  • mul

Popular in Java

  • Start an intent from android
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now