47 std::string class_name;
52 class_name =
"Cpeak_interpG";
56 virtual void sub_pixel(CImg<T> &img)
62 for (
int i=0; i<this->m_pos.size(); i++)
64 cur[i] = this->m_pos[i];
68 if (img.get_crop(cur[0]-1,cur[1]-1,cur[2]-1,0,cur[0]+1,cur[1]+1,cur[2]+1,0).get_stats()[0]<=0)
71 printf(
"\t\t\t\t\t\t\t\tWarning, image value incompatible with gaussian fit, polynomial one is used");
76 std::vector<T> prev, next;
80 for (
int i=0; i<this->m_pos.size(); i++)
82 prev[i] = this->m_pos[i];
83 next[i] = this->m_pos[i];
86 for (
int i=0; i<this->m_pos.size(); i++)
89 if (cur[i]>0 and cur[i]<this->dim(img,i)-1)
95 this->interp(log(img(cur[0],cur[1],cur[2])), log(img(prev[0],prev[1],prev[2])), log(img(next[0],next[1],next[2])), this->m_pos[i]);
Definition: Cpeak_interpG.h:42
Definition: Cpeak_interpP.h:42