plastimatch
Loading...
Searching...
No Matches
distance_map.cxx File Reference
#include "plm_config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <deque>
#include <vector>
#include "itkImage.h"
#include "image_boundary.h"
#include "distance_map.h"
#include "itk_distance_map.h"
#include "itk_image_type.h"
#include "plm_image.h"
#include "volume.h"
#include "volume_header.h"

Macros

#define SQ_DIST(idx, sp2)
 
#define SQ_DIST_I(idx, sp2)
 
#define SQ_DIST_J(idx, sp2)
 
#define SQ_DIST_K(idx, sp2)
 
#define COPY_I(new_idx, old_idx)
 
#define COPY_J(new_idx, old_idx)
 
#define COPY_K(new_idx, old_idx)
 

Macro Definition Documentation

◆ COPY_I

#define COPY_I ( new_idx,
old_idx )
Value:
dm[3*new_idx+0] = dm[3*old_idx+0] + 1; \
dm[3*new_idx+1] = dm[3*old_idx+1]; \
dm[3*new_idx+2] = dm[3*old_idx+2];

◆ COPY_J

#define COPY_J ( new_idx,
old_idx )
Value:
dm[3*new_idx+0] = dm[3*old_idx+0]; \
dm[3*new_idx+1] = dm[3*old_idx+1] + 1; \
dm[3*new_idx+2] = dm[3*old_idx+2];

◆ COPY_K

#define COPY_K ( new_idx,
old_idx )
Value:
dm[3*new_idx+0] = dm[3*old_idx+0]; \
dm[3*new_idx+1] = dm[3*old_idx+1]; \
dm[3*new_idx+2] = dm[3*old_idx+2] + 1;

◆ SQ_DIST

#define SQ_DIST ( idx,
sp2 )
Value:
dm[3*idx+0]*dm[3*idx+0]*sp2[0] \
+ dm[3*idx+1]*dm[3*idx+1]*sp2[1] \
+ dm[3*idx+2]*dm[3*idx+2]*sp2[2]

◆ SQ_DIST_I

#define SQ_DIST_I ( idx,
sp2 )
Value:
(dm[3*idx+0]+1)*(dm[3*idx+0]+1)*sp2[0] \
+ dm[3*idx+1]*dm[3*idx+1]*sp2[1] \
+ dm[3*idx+2]*dm[3*idx+2]*sp2[2]

◆ SQ_DIST_J

#define SQ_DIST_J ( idx,
sp2 )
Value:
dm[3*idx+0]*dm[3*idx+0]*sp2[0] \
+ (dm[3*idx+1]+1)*(dm[3*idx+1]+1)*sp2[1] \
+ dm[3*idx+2]*dm[3*idx+2]*sp2[2]

◆ SQ_DIST_K

#define SQ_DIST_K ( idx,
sp2 )
Value:
dm[3*idx+0]*dm[3*idx+0]*sp2[0] \
+ dm[3*idx+1]*dm[3*idx+1]*sp2[1] \
+ (dm[3*idx+2]+1)*(dm[3*idx+2]+1)*sp2[2]