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

How to use
NamedPointWorld
in
landmarks

Best Java code snippets using landmarks.NamedPointWorld (Showing top 20 results out of 315)

origin: sc.fiji/VIB-lib

public NamedPointWorld transformWith(OrderedTransformations o) {
  double[] result=new double[3];
  o.apply(x,y,z,result);
  return new NamedPointWorld(name,result[0],result[1],result[2]);
}
origin: sc.fiji/VIB-lib

  public String toIGS() {
    return "landmark {\n\tname \""+escape(name)+"\"\n\tlocation "+
      x+" "+y+" "+z+"\n}";
  }
}
origin: sc.fiji/VIB-lib

public int getIndexOfPoint( String name ) {
  int i = 0;
  for( NamedPointWorld p : pointsWorld ) {
    if( p.getName().equals( name ) )
      return i;
    ++i;
  }
  return -1;
}
origin: sc.fiji/VIB-lib

public String toString( ) {
  StringBuffer sb = new StringBuffer();
  for( NamedPointWorld npw : pointsWorld ) {
    sb.append( npw.toString() );
    sb.append( "\n" );
  }
  return sb.toString();
}
origin: sc.fiji/VIB-lib

  public ImagePlus register( NamedPointSet points0, NamedPointSet points1 ) {

    ArrayList< String > sharedNames = points0.namesSharedWith( points1, true );

    Point3d[] fromPoints = new Point3d[sharedNames.size()];
    Point3d[] toPoints = new Point3d[sharedNames.size()];

    int pointIndex = 0;
    for( String name : sharedNames ) {
      NamedPointWorld npw0 = points0.getPoint(name);
      NamedPointWorld npw1 = points1.getPoint(name);
      toPoints[pointIndex] = npw0.toPoint3d();
      fromPoints[pointIndex] = npw1.toPoint3d();
      ++ pointIndex;
    }

    FastMatrix fm = FastMatrix.bestRigid( fromPoints, toPoints, allowScaling );

    TransformedImage ti = new TransformedImage( sourceImages[0], sourceImages[1] );
    ti.setTransformation( fm );

    ImagePlus transformed = ti.getTransformed();
    transformed.setTitle( "Transformed" );
    return transformed;
  }
}
origin: sc.fiji/VIB-lib

synchronized public boolean renamePointTo( int i, String newName ) {
  NamedPointWorld existing = get( newName );
  if( existing == null ) {
    pointsWorld.get(i).setName( newName );
    return true;
  } else {
    return false;
  }
}
origin: sc.fiji/VIB-lib

public NamedPointSet transformPointsWith( OrderedTransformations o ) {
  NamedPointSet result = new NamedPointSet();
  Iterator i0;
  for( i0 = pointsWorld.listIterator(); i0.hasNext(); ) {
    NamedPointWorld p = (NamedPointWorld)i0.next();
    NamedPointWorld transformed = p.transformWith(o);
    result.add( transformed );
  }
  return result;
}
origin: sc.fiji/VIB-lib

public boolean saveIGSPointsFile( String savePath ) {
  try {
    FileOutputStream fos = new FileOutputStream(savePath);
    StringBuffer sb=new StringBuffer("! TYPEDSTREAM 1.1\n");
    Iterator<NamedPointWorld> i;
    for(i=listIterator();i.hasNext();) {
      NamedPointWorld p = i.next();
      if(p.set) sb.append(p.toIGS()+"\n");
    }
    fos.write(sb.toString().getBytes("UTF-8"));
    fos.close();
    return true;
  } catch( IOException e ) {
    return false;
  }
}
origin: sc.fiji/VIB-lib

public String xmlDataAsString( ) {
  StringBuffer result = new StringBuffer();
  result.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
  result.append("<!DOCTYPE namedpointset [\n");
  result.append("  <!ELEMENT namedpointset (pointworld*)>\n");
  result.append("  <!ELEMENT pointworld EMPTY>\n");
  result.append("  <!ATTLIST namedpointset version CDATA #REQUIRED>\n");
  result.append("  <!ATTLIST pointworld set (true|false) #REQUIRED>\n");
  result.append("  <!ATTLIST pointworld name CDATA #REQUIRED>\n");
  result.append("  <!ATTLIST pointworld x CDATA #IMPLIED>\n");
  result.append("  <!ATTLIST pointworld y CDATA #IMPLIED>\n");
  result.append("  <!ATTLIST pointworld z CDATA #IMPLIED>\n");
  result.append("]>\n\n");
  result.append("<namedpointset version=\"1.0\">\n");
  Iterator<NamedPointWorld> i = pointsWorld.iterator();
  while( i.hasNext() ) {
    NamedPointWorld p = i.next();
    result.append("  ");
    result.append(p.toXMLElement());
    result.append("\n");
  }
  result.append("</namedpointset>\n");
  return result.toString();
}
origin: sc.fiji/VIB-lib

point.set( xWorld, yWorld, zWorld );
origin: sc.fiji/VIB-lib

System.out.println("Finished batchFineTuning one point, was: "+fineTuneThread.guessedPoint.toString());
System.out.println("Point is now: "+points.get( indexOfPointBeingFineTuned ).toString());
fineTuning = false;
origin: sc.fiji/VIB-lib

NamedPointWorld npw1 = fromCommon.get(choice[i]);
NamedPointWorld npw0 = toCommon.get(choice[i]);
from[i] = npw1.toPoint3d();
to[i] = npw0.toPoint3d();
origin: sc.fiji/VIB-lib

public NamedPointWorld transformWith( FastMatrix m ) {
  m.apply(x,y,z);
  return new NamedPointWorld( name, m.x, m.y, m.z );
}
origin: sc.fiji/VIB-lib

public Set< String > getNamesAsSet( ) {
  HashSet< String > namesSet = new HashSet< String >();
  for( NamedPointWorld npw : pointsWorld ) {
    namesSet.add( npw.getName() );
  }
  return namesSet;
}
origin: sc.fiji/VIB-lib

public String toYAML() {
  if( set )
    return "\"" + escape(name) + "\": [ " + x + ", " + y + ", " + z + " ]";
  else
    return "\"" + escape(name) + "\":";
}
origin: sc.fiji/VIB-lib

synchronized public NamedPointWorld addNewPoint( ) {
  int i = pointsWorld.size();
  boolean nameTaken = true;
  String newName = null;
  while( nameTaken ) {
    newName = "Named Point (" + i + ")";
    nameTaken = get( newName ) != null;
    ++ i;
  }
  NamedPointWorld toAdd = new NamedPointWorld( newName );
  pointsWorld.add( toAdd );
  return toAdd;
}
origin: sc.fiji/VIB-lib

public NamedPointWorld get(String name) {
  Iterator<NamedPointWorld> i0;
  for(i0=pointsWorld.listIterator();i0.hasNext();) {
    NamedPointWorld p=i0.next();
    if( p.getName().equals(name) )
      return p;
  }
  return null;
}
origin: sc.fiji/VIB-lib

  y = Double.parseDouble( yString );
  z = Double.parseDouble( zString );
  nps.add( new NamedPointWorld( name, x, y, z ) );
} catch( NumberFormatException e ) {
  throw new SAXException( "One of 'x', 'y' and 'z' couldn't be parsed as a number" );
nps.add( new NamedPointWorld( name ) );
origin: sc.fiji/VIB-lib

public void add(NamedPointWorld namedPointWorld) {
  synchronized (this) {
    String name = namedPointWorld.getName();
    NamedPointWorld existing = get( name );
    if( existing != null )
      throw new RuntimeException( "Trying to add a point of name '" + name + "', but this NamedPointSet already has one." );
    pointsWorld.add( namedPointWorld );
  }
}
origin: sc.fiji/VIB-lib

  double y = Double.parseDouble( yString );
  double z = Double.parseDouble( zString );
  nps.add( new NamedPointWorld( name, x, y, z ) );
} else {
  nps.add( new NamedPointWorld( name ) );
  nps.add( new NamedPointWorld( m_data.group(1),
           Double.parseDouble(m_data.group(2)) * xSpacing,
           Double.parseDouble(m_data.group(3)) * ySpacing,
           Double.parseDouble(m_data.group(4)) * zSpacing) );
} else if (m_name_no_data.matches()) {
  nps.add( new NamedPointWorld( m_name_no_data.group(1) ) );
} else if (m_comment.matches()) {
  continue;
landmarksNamedPointWorld

Most used methods

  • <init>
  • escape
  • getName
  • set
  • setName
  • toIGS
  • toPoint3d
  • toString
  • toXMLElement
  • transformWith
  • unset
  • unset

Popular in Java

  • Running tasks concurrently on multiple threads
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Reference (javax.naming)
  • Table (org.hibernate.mapping)
    A relational table
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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