9 #ifndef IMPEM_KERNEL_PARAMETERS_H
10 #define IMPEM_KERNEL_PARAMETERS_H
13 #include <boost/scoped_array.hpp>
30 float radii,
float rsigsq,
float timessig,
31 float sq2pi3,
float inv_rsigsq,
float rnormfac,
float rkdist);
33 void show(std::ostream& s=std::cout)
const;
41 inline float get_sig()
const {
return sig_;}
47 vsig_= std::numeric_limits<float>::quiet_NaN();
48 vsigsq_= std::numeric_limits<float>::quiet_NaN();
49 inv_sigsq_= std::numeric_limits<float>::quiet_NaN();
50 sig_= std::numeric_limits<float>::quiet_NaN();
51 kdist_= std::numeric_limits<float>::quiet_NaN();
52 normfac_= std::numeric_limits<float>::quiet_NaN();
107 float radius,
float eps=0.001);
133 float rsig_,rsigsq_,timessig_,sq2pi3_,inv_rsigsq_,rnormfac_,rkdist_,lim_;
135 std::map <float,const RadiusDependentKernelParameters* > radii2params_;
136 void init(
float resolution);
141 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
142 class IMPEMEXPORT Kernel3D {
145 Kernel3D(
const Kernel3D &other) {
147 dim_ext_=other.dim_ext_;
148 data_.reset(
new double[size_]);
149 std::copy(other.data_.get(),other.data_.get()+size_,data_.get());
151 Kernel3D(
int size,
int ext) {
152 size_=size;dim_ext_=ext;
153 data_.reset(
new double[size_]);
155 for(
int i=0;i<size_;i++) data_[i]=0.;
157 double *get_data()
const {
return data_.get();}
158 int get_size()
const {
return size_;}
159 int get_extent()
const {
return dim_ext_;}
161 boost::scoped_array<double> data_;
166 Kernel3D create_3d_gaussian (
double sigma,
double sigma_factor);
168 Kernel3D create_3d_laplacian();
171 Kernel3D get_truncated(
double *data,
int extent,
double sigmap,
double sigma_fac);