![]() |
1.3.1
Geostatistics & Machine Learning toolbox | https://gstlearn.org
|
![]() |
Image Neighborhood definition. More...
#include <NeighImage.hpp>
Image Neighborhood definition.
The Neighborhood is usually meant to select a sub-population from the input Data Base, containing the active samples close to the target.
This Neighborhood is only defined in the case when the Data and the Target belong to the same grid. This neighborhood is defined as a rectangular set of pixels, located around the target. This rectangle is given by its half-extension in each space dimension (called 'radius') As the number of pixels grows fast with the space dimension, it is offered to sample them by specifying a skipping factor, so as to retain only 1 / (1 + skip) of them.
Public Member Functions | |
NeighImage (const VectorInt &radius=VectorInt(), int skip=0, const ASpace *space=nullptr) | |
NeighImage (const NeighImage &r) | |
NeighImage & | operator= (const NeighImage &r) |
virtual | ~NeighImage () |
virtual void | getNeigh (int iech_out, VectorInt &ranks) override |
Interface for ANeigh. More... | |
virtual int | getMaxSampleNumber (const Db *db) const override |
virtual bool | hasChanged (int iech_out) const override |
virtual ENeigh | getType () const override |
virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
Interface for AStringable. More... | |
int | getSkip () const |
const VectorInt & | getImageRadius () const |
int | getImageRadius (int idim) const |
void | setImageRadius (const VectorInt &imageRadius) |
void | setSkip (int skip) |
![]() | |
ANeigh (const ASpace *space=nullptr) | |
ANeigh (const ANeigh &r) | |
ANeigh & | operator= (const ANeigh &r) |
virtual | ~ANeigh () |
virtual bool | isConsistent (const ASpace *space) const override |
ASpaceObject Interface. More... | |
virtual int | attach (const Db *dbin, const Db *dbout) |
Interface for ANeigh. More... | |
virtual VectorDouble | summary (int iech_out) |
virtual bool | getFlagContinuous () const |
void | select (int iech_out, VectorInt &ranks) |
bool | isUnchanged () const |
void | setIsChanged (bool status=false) |
void | reset () |
bool | getFlagXvalid () const |
bool | getFlagKFold () const |
void | setFlagXvalid (bool flagXvalid) |
void | setFlagKFold (bool flagKFold) |
void | setFlagSimu (bool flagSimu) |
void | setRankColCok (const VectorInt &rankColCok) |
![]() | |
ASpaceObject (const ASpace *space=nullptr) | |
ASpaceObject (const ASpace &space) | |
ASpaceObject (const ASpaceObject &r) | |
ASpaceObject & | operator= (const ASpaceObject &r) |
virtual | ~ASpaceObject () |
const ASpace * | getSpace () const |
Accessor to the current object space context. More... | |
bool | isConsistent () const |
Indicate if I am consistent with my current space context. More... | |
VectorDouble | getUnitaryVector () const |
Return unitary vector for the current space context. More... | |
unsigned int | getNDim () const |
Shortcuts to ASpace methods. More... | |
const VectorDouble & | getOrigin () const |
Return the current space context origin coordinates. More... | |
double | getDistance (const SpacePoint &p1, const SpacePoint &p2) const |
Return the distance between two space points for the current space context. More... | |
double | getDistance1D (const SpacePoint &p1, const SpacePoint &p2, int idim) const |
Return the distance along one direction between two space points. More... | |
VectorDouble | getIncrement (const SpacePoint &p1, const SpacePoint &p2) const |
Return the increment vector between two space points for the current space context. More... | |
![]() | |
AStringable () | |
AStringable (const AStringable &r) | |
AStringable & | operator= (const AStringable &r) |
virtual | ~AStringable () |
virtual void | display (const AStringFormat *strfmt=nullptr) const final |
virtual void | display (int level) const final |
![]() | |
ASerializable () | |
ASerializable (const ASerializable &r) | |
ASerializable & | operator= (const ASerializable &r) |
virtual | ~ASerializable () |
bool | deserialize (std::istream &is, bool verbose=true) |
bool | serialize (std::ostream &os, bool verbose=true) const |
bool | dumpToNF (const String &neutralFilename, bool verbose=false) const |
Static Public Member Functions | |
static NeighImage * | create (const VectorInt &image, int skip=0, const ASpace *space=nullptr) |
static NeighImage * | createFromNF (const String &neutralFilename, bool verbose=true) |
![]() | |
static String | buildFileName (int status, const String &filename, bool ensureDirExist=false) |
static String | getHomeDirectory (const String &sub="") |
static String | getWorkingDirectory () |
static String | getTestData (const String &subdir, const String &filename) |
static String | getFileIdentity (const String &filename, bool verbose=false) |
static void | setContainerName (bool useDefault, const String &containerName="", bool verbose=false) |
static void | unsetContainerName () |
static void | setPrefixName (const String &prefixName) |
static void | unsetPrefixName () |
static const String & | getContainerName () |
static const String & | getPrefixName () |
static bool | createDirectory (const String &dir) |
static String | getExecDirectory () |
static String | getDirectory (const String &path) |
NeighImage::NeighImage | ( | const VectorInt & | radius = VectorInt() , |
int | skip = 0 , |
||
const ASpace * | space = nullptr |
||
) |
NeighImage::NeighImage | ( | const NeighImage & | r | ) |
|
virtual |
|
static |
|
static |
Create a NeighImageborhood by loading the contents of a Neutral File
neutralFilename | Name of the Neutral File |
verbose | Verbose flag |
|
inline |
|
inline |
|
overridevirtual |
|
overridevirtual |
|
inline |
|
inlineoverridevirtual |
Reimplemented from ANeigh.
|
overridevirtual |
Reimplemented from ANeigh.
NeighImage & NeighImage::operator= | ( | const NeighImage & | r | ) |
|
inline |
|
inline |
|
overridevirtual |
Interface for AStringable.
Reimplemented from ASpaceObject.