* Key: {@code -star.nocenter} *
*/ public static final OptionID NOCENTER_ID = new OptionID("star.nocenter", "Do not use the center as extra reference point."); /** * Parameter to specify the extra scaling of the space, to allow * out-of-data-space reference points. ** Key: {@code -star.scale} *
*/ public static final OptionID SCALE_ID = new OptionID("star.scale", "Scale the reference points by the given factor. This can be used to obtain reference points outside the used data space."); /** * Holds the value of {@link #NOCENTER_ID}. */ protected boolean nocenter; /** * Holds the value of {@link #SCALE_ID}. */ protected double scale; @Override protected void makeOptions(Parameterization config) { super.makeOptions(config); Flag nocenterF = new Flag(NOCENTER_ID); if(config.grab(nocenterF)) { nocenter = nocenterF.getValue(); } DoubleParameter scaleP = new DoubleParameter(SCALE_ID, 1.0) // .addConstraint(CommonConstraints.GREATER_EQUAL_ZERO_DOUBLE); if(config.grab(scaleP)) { scale = scaleP.getValue(); } } @Override protected StarBasedReferencePoints makeInstance() { return new StarBasedReferencePoints(nocenter, scale); } } }