// Catalano Imaging Library
// The Catalano Framework
//
// Copyright © Diego Catalano, 2012-2016
// diego.catalano at live.com
//
// Copyright © Philippe Thevenaz, 2011
// philippe.thevenaz at epfl.ch
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
package Catalano.Imaging.ActiveContour.Ovuscule;
import Catalano.Core.DoublePoint;
/**
* This class is used to store the snake-defining parameters. It extends
* the capabilities of the class DoublePoint by
* additional state variables.
* @author Diego Catalano
*/
public class OvusculeSnake2DNode extends DoublePoint {
/**
* Methods of the class OvusculeSnake2DKeeper are allowed
* to modify OvusculeSnake2DNode objects only if their
* frozen flag is set to false.
*/
public boolean frozen = false;
/**
* Methods of the class OvusculeSnake2DKeeper are allowed
* to interactively display (as a cross) the nodes stored in
* OvusculeSnake2DNode objects only if their
* hidden flag is set to false.
*/
public boolean hidden = false;
@Override
public String toString () {
return("[" + super.toString()
+ ", frozen: " + frozen
+ ", hidden: " + hidden
+ "]"
);
}
/**
* This constructor builds a point that is initially neither frozen nor hidden.
* @param x The horizontal coordinate.
* @param y The vertical coordinate.
*/
public OvusculeSnake2DNode (double x, double y) {
super(x, y);
}
/**
* This constructor builds a point with the given initial values.
* @param x The horizontal coordinate.
* @param y The vertical coordinate.
* @param frozen Set to false to allow methods of the class
* OvusculeSnake2DKeeper to modify this point. Set to
* true otherwise.
* @param hidden Set to false to allow methods of the class
* OvusculeSnake2DKeeper to display this point. Set to
* true otherwise.
*/
public OvusculeSnake2DNode (double x, double y, boolean frozen, boolean hidden) {
super(x, y);
this.frozen = frozen;
this.hidden = hidden;
}
}
Ads help maintain this website.