Namespaces | Defines | Functions | Variables
regions.cc File Reference
#include <fstream>
#include <list>
#include <limits>
#include <map>
#include <set>
#include <vector>
#include "draw.h"
#include "regions.h"
#include "neighbours.h"
#include "transform.h"
#include "morphology.h"
#include "toolbox.h"
#include "imgfiles.h"
#include "vector3d.h"

Namespaces

namespace  i3d

Defines

#define BD(a, b, c, d, e, f, g, h)   ((a << 7) | (b << 6) | (c << 5) | (d << 4) | (e << 3) | (f << 2) | (g << 1) | h)
#define BD2(a, b, c, d)   ((a << 3) | (b << 2) | (c << 1) | d)
#define SQR(x)   ((x) * (x))

Functions

static void i3d::Restrict (const Neighbourhood &nb, Neighbourhood &rnb)
template<class LABEL >
static void i3d::AdjustL2R (std::vector< LABEL > &l2r, std::list< LABEL > &l, LABEL new_r)
template<class LABEL , class VOXEL >
static void i3d::GetLabels (const VOXEL v, const std::vector< VOXEL * > &win1, const std::vector< LABEL * > &win2, std::vector< LABEL > &val)
template<class LABEL >
static void i3d::ComputeTransitiveClosure (std::map< LABEL, std::set< LABEL > > &neigh_list, std::vector< LABEL > &remap_list)
template<class ORIGVOXEL , class LABEL , class VOXEL >
bool i3d::WeightedCenter (const Image3d< ORIGVOXEL > &img, const LabeledImage3d< LABEL, VOXEL > &labels, LABEL label, Vector3d< float > &center)
template I3D_ALGO_EXPORT bool i3d::WeightedCenter (const Image3d< GRAY8 > &, const LabeledImage3d< size_t, bool > &, size_t, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::WeightedCenter (const Image3d< GRAY8 > &, const LabeledImage3d< size_t, GRAY8 > &, size_t, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::WeightedCenter (const Image3d< GRAY8 > &, const LabeledImage3d< bool, bool > &, bool, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::WeightedCenter (const Image3d< GRAY8 > &, const LabeledImage3d< unsigned short, bool > &, unsigned short, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::WeightedCenter (const Image3d< GRAY16 > &, const LabeledImage3d< unsigned short, bool > &, unsigned short, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::WeightedCenter (const Image3d< GRAY16 > &, const LabeledImage3d< size_t, GRAY16 > &, size_t, Vector3d< float > &)
template<class LABEL , class VOXEL >
bool i3d::Center (const LabeledImage3d< LABEL, VOXEL > &labels, LABEL label, Vector3d< float > &center)
template I3D_ALGO_EXPORT bool i3d::Center (const LabeledImage3d< size_t, bool > &, size_t, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::Center (const LabeledImage3d< size_t, GRAY8 > &, size_t, Vector3d< float > &)
template I3D_ALGO_EXPORT bool i3d::Center (const LabeledImage3d< bool, bool > &, bool, Vector3d< float > &)
template<class LABEL , class VOXEL >
double i3d::Surface (const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label, size_t &volume)
template I3D_ALGO_EXPORT double i3d::Surface (const LabeledImage3d< size_t, GRAY8 > &, size_t, size_t &)
template I3D_ALGO_EXPORT double i3d::Surface (const LabeledImage3d< size_t, bool > &, size_t, size_t &)
template I3D_ALGO_EXPORT double i3d::Surface (const LabeledImage3d< bool, bool > &, bool, size_t &)
template I3D_ALGO_EXPORT double i3d::Surface (const LabeledImage3d< GRAY16, bool > &, GRAY16, size_t &)
template<class LABEL , class VOXEL >
double i3d::Roundness (const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label)
template I3D_ALGO_EXPORT double i3d::Roundness (const LabeledImage3d< size_t, GRAY8 > &, size_t)
template<class LABEL , class VOXEL >
double i3d::RoundnessFactor (const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label, const Vector3d< float > &wcenter, double volume=-1)
template I3D_ALGO_EXPORT double i3d::RoundnessFactor (const LabeledImage3d< GRAY16, bool > &limg, GRAY16 label, const Vector3d< float > &wcenter, double volume)
template<class LABEL , class VOXEL >
Boundary i3d::GetComponentBoundary (const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label)
template I3D_ALGO_EXPORT Boundary i3d::GetComponentBoundary (const LabeledImage3d< size_t, GRAY8 > &, size_t)
template<class LABEL , class VOXEL >
void i3d::Radius (const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label, const Vector3d< float > &center, float &min, float &max, float &mean)
template I3D_ALGO_EXPORT void i3d::Radius (const LabeledImage3d< size_t, GRAY8 > &, size_t, const Vector3d< float > &, float &, float &, float &)
template<class ORIGVOXEL , class LABEL , class VOXEL >
void i3d::IntensityHist (const Image3d< ORIGVOXEL > &img, const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label, Histogram &hist)
template I3D_ALGO_EXPORT void i3d::IntensityHist (const Image3d< GRAY8 > &, const LabeledImage3d< size_t, GRAY8 > &, size_t, Histogram &)
template<class ORIGVOXEL , class LABEL , class VOXEL >
void i3d::MinMaxComponentValue (const Image3d< ORIGVOXEL > &img, const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label, ORIGVOXEL &min, ORIGVOXEL &max)
template I3D_ALGO_EXPORT void i3d::MinMaxComponentValue (const Image3d< float > &, const LabeledImage3d< size_t, GRAY8 > &, size_t, float &, float &)
template I3D_ALGO_EXPORT void i3d::MinMaxComponentValue (const Image3d< float > &, const LabeledImage3d< GRAY16, bool > &, GRAY16, float &, float &)
template<class ORIGVOXEL , class LABEL , class VOXEL , class Predicate >
void i3d::RemoveComponents (Image3d< ORIGVOXEL > &img, const LabeledImage3d< LABEL, VOXEL > &limg, Predicate &pred)
template I3D_ALGO_EXPORT void i3d::RemoveComponents (Image3d< GRAY8 > &, const LabeledImage3d< size_t, GRAY8 > &, ComponentToRemove< size_t, GRAY8 > &)
template I3D_ALGO_EXPORT void i3d::RemoveComponents (Image3d< GRAY16 > &, const LabeledImage3d< size_t, GRAY16 > &, ComponentToRemove< size_t, GRAY16 > &)
template<class ORIGVOXEL , class LABEL , class VOXEL , class Predicate >
void i3d::EraseComponents (Image3d< ORIGVOXEL > &img, LabeledImage3d< LABEL, VOXEL > &limg, Predicate &pred)
template I3D_ALGO_EXPORT void i3d::EraseComponents (Image3d< bool > &, LabeledImage3d< GRAY16, bool > &, ComponentToRemove< GRAY16, bool > &)
template I3D_ALGO_EXPORT void i3d::EraseComponents (Image3d< GRAY16 > &, LabeledImage3d< size_t, GRAY16 > &, ComponentToRemove< size_t, GRAY16 > &)
bool i3d::HasIntersection (const VOI< UPIXELS > &img_voi, const VOI< UPIXELS > &obj_voi, bool bdr_x, bool bdr_y, bool bdr_z)
template<class LABEL , class VOXEL >
void i3d::bbox_init_and_copy (Image3d< LABEL > &tmp, const LabeledImage3d< LABEL, VOXEL > &limg, const VOI< UPIXELS > &bbox, const LABEL pvalue)
template<class LABEL >
std::vector< Vector3d< float > > * i3d::ExtractBorderPoints (const Image3d< LABEL > &img, const Vector3d< size_t > &offset)
template<class LABEL , class VOXEL >
components_distance_matrix * i3d::CreateDistMatrix (const LabeledImage3d< LABEL, VOXEL > &limgA, const LabeledImage3d< LABEL, VOXEL > &limgB, const double max_dist=DMAX)
static void i3d::MC_BuildPerimeterLookup (const Vector3d< float > &res, double *lt)
void i3d::MC_BuildSurfaceLookup (const Vector3d< float > &res, double *lt)
static void i3d::MC_BuildAreaLookup (const Vector3d< float > &res, double *lt)
void i3d::MC_BuildVolumeLookup (const Vector3d< float > &res, double *lt)
template<class LABEL , class VOXEL >
double i3d::MC_Estimate (const LabeledImage3d< LABEL, VOXEL > &limg, LABEL label, McEstimateType type)
template I3D_ALGO_EXPORT double i3d::MC_Estimate (const LabeledImage3d< size_t, bool > &, size_t, McEstimateType)
template I3D_ALGO_EXPORT double i3d::MC_Estimate (const LabeledImage3d< GRAY16, bool > &, GRAY16, McEstimateType)
template I3D_ALGO_EXPORT double i3d::MC_Estimate (const LabeledImage3d< GRAY16, GRAY16 > &, GRAY16, McEstimateType)
template struct
I3D_ALGO_EXPORT
components_distance_matrix * 
i3d::CreateDistMatrix (const LabeledImage3d< size_t, bool > &, const LabeledImage3d< size_t, bool > &, const double)
template struct
I3D_ALGO_EXPORT
components_distance_matrix * 
i3d::CreateDistMatrix (const LabeledImage3d< size_t, GRAY8 > &, const LabeledImage3d< size_t, GRAY8 > &, const double)
template I3D_ALGO_EXPORT void i3d::bbox_init_and_copy (Image3d< size_t > &tmp, const LabeledImage3d< size_t, GRAY8 > &limg, const VOI< UPIXELS > &bbox, const size_t pvalue)
template I3D_ALGO_EXPORT
std::vector< Vector3d< float > > * 
i3d::ExtractBorderPoints (const Image3d< size_t > &img, const Vector3d< size_t > &offset)

Variables

template class I3D_ALGO_EXPORT i3d::ComponentToRemove< size_t, GRAY8 >
template class I3D_ALGO_EXPORT i3d::ComponentToRemove< size_t, GRAY16 >
template class I3D_ALGO_EXPORT i3d::ComponentToRemove< size_t, bool >
template class I3D_ALGO_EXPORT i3d::ComponentToRemove< GRAY8, bool >
template class I3D_ALGO_EXPORT i3d::ComponentToRemove< GRAY16, bool >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< size_t, GRAY8 >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< GRAY8, GRAY8 >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< size_t, bool >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< GRAY8, bool >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< GRAY16, bool >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< size_t, GRAY16 >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< GRAY8, GRAY16 >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< GRAY16, GRAY16 >
template class I3D_ALGO_EXPORT i3d::LabeledImage3d< int, bool >

Define Documentation

#define BD (   a,
  b,
  c,
  d,
  e,
  f,
  g,
 
)    ((a << 7) | (b << 6) | (c << 5) | (d << 4) | (e << 3) | (f << 2) | (g << 1) | h)
#define BD2 (   a,
  b,
  c,
 
)    ((a << 3) | (b << 2) | (c << 1) | d)
#define SQR (   x)    ((x) * (x))

Variable Documentation

bool is_3d_ [static]
std::vector<const T*> p_
Neighbourhood nbh
size_t how_long
const Image3d<T>& img_
size_t c_voxel
T c_val