19 #ifndef __itkSamplingScheme3D_hxx 20 #define __itkSamplingScheme3D_hxx 29 template <
class TPixelType>
40 m_RadiusThresholdSingleShell = 1e-4;
43 template <
class TPixelType>
48 if (m_RadiusVector != radiusVec)
50 m_RadiusVector = radiusVec;
51 if (m_RadiusVector->size()>0)
57 template <
class TPixelType>
62 unsigned int num = GetNumberOfShells();
64 if (shellIndex<num && m_RadiusVector->size()>num)
67 for (
unsigned int i = 0; i < vecTmp.size(); i += 1 )
69 radiusVec->push_back( (*m_RadiusVector)[vecTmp[i] ] );
75 template <
class TPixelType>
80 if (alwarysReCalculate)
83 utl::PointsContainerToUtlMatrix<Superclass, double>(*
this, *m_OrientationsCartesian);
84 return m_OrientationsCartesian;
88 if (m_OrientationsCartesian->Rows()==GetNumberOfSamples())
89 return m_OrientationsCartesian;
90 else if (m_OrientationsSpherical->Rows()==GetNumberOfSamples())
94 return m_OrientationsCartesian;
96 else if (this->GetNumberOfSamples()>0)
99 utl::PointsContainerToUtlMatrix<Superclass, double>(*
this, *m_OrientationsCartesian);
100 return m_OrientationsCartesian;
108 template <
class TPixelType>
113 if (alwarysReCalculate)
117 utl::PointsContainerToUtlMatrix<Superclass, double>(*
this, *m_OrientationsCartesian);
119 return m_OrientationsSpherical;
123 if (m_OrientationsSpherical->Rows()==GetNumberOfSamples())
124 return m_OrientationsSpherical;
125 else if (m_OrientationsCartesian->Rows()==GetNumberOfSamples())
129 return m_OrientationsSpherical;
131 else if (this->GetNumberOfSamples()>0)
135 utl::PointsContainerToUtlMatrix<Superclass, double>(*
this, *m_OrientationsCartesian);
137 return m_OrientationsSpherical;
145 template <
class TPixelType>
150 m_OrientationsCartesian = mat;
151 utl::UtlMatrixToPointsContainer<double, Superclass>(*m_OrientationsCartesian, *
this);
156 template <
class TPixelType>
161 unsigned int num = GetNumberOfSamplesInShell(shellIndex);
165 m_OrientationsSpherical = GetOrientationsSpherical();
166 *mat = m_OrientationsSpherical->GetRows((*m_IndicesInShells)[shellIndex]);
170 template <
class TPixelType>
175 m_OrientationsSpherical = mat;
178 utl::UtlMatrixToPointsContainer<double, Superclass>(*m_OrientationsCartesian, *
this);
182 template <
class TPixelType>
187 unsigned int num = GetNumberOfSamplesInShell(shellIndex);
191 for (
unsigned int i = 0; i < num; i += 1 )
193 unsigned int ii = (*m_IndicesInShells)[shellIndex][i];
194 (*mat)(i,0) = (*
this)[ii][0];
195 (*mat)(i,1) = (*
this)[ii][1];
196 (*mat)(i,2) = (*
this)[ii][2];
201 template <
class TPixelType>
206 unsigned int num = GetNumberOfSamples();
207 double xi,yi,zi, norm2;
208 bool isPerformNormalization =
false;
209 for (
unsigned int i = 0; i < num; i += 1 )
214 norm2 = xi*xi + yi*yi + zi*zi;
215 if (norm2>0 && std::fabs(norm2-1)>1e-8 )
217 norm2 = std::sqrt(norm2);
218 (*this)[i][0] = xi / norm2;
219 (*this)[i][1] = yi / norm2;
220 (*this)[i][2] = yi / norm2;
221 isPerformNormalization =
true;
224 if (isPerformNormalization)
231 template <
class TPixelType>
232 typename LightObject::Pointer
236 typename LightObject::Pointer loPtr = Superclass::InternalClone();
241 itkExceptionMacro(<<
"downcast to type " << this->GetNameOfClass()<<
" failed.");
244 for (
int i = 0; i < this->size(); i += 1 )
245 rval->push_back((*
this)[i]);
247 rval->m_DeltaSmall = m_DeltaSmall;
248 rval->m_DeltaBig = m_DeltaBig;
250 rval->m_RadiusThresholdSingleShell = m_RadiusThresholdSingleShell;
254 *rval->m_RadiusVector = *m_RadiusVector;
255 *rval->m_IndicesInShells = *m_IndicesInShells;
256 rval->m_OrientationsCartesian = m_OrientationsCartesian;
257 rval->m_OrientationsSpherical = m_OrientationsSpherical;
261 template <
class TPixelType>
266 this->Superclass::Initialize();
274 template <
class TPixelType>
281 utlGlobalException(m_IndicesInShells->size()==0,
"need to set m_IndicesInShells first");
282 utlGlobalException(m_RadiusVector->size()>0 && m_RadiusVector->size()!=this->size(),
"different size of radiusVector and gradients");
284 Pointer selfClone = this->Clone();
287 for (
int i = 0; i < selfClone->GetNumberOfShells(); ++i )
291 for (
int j = 0; j < indices.size(); ++j )
293 this->push_back((*selfClone)[indices[j]]);
294 if (selfClone->m_RadiusVector->size()>0)
295 this->m_RadiusVector->push_back((*selfClone->m_RadiusVector)[indices[j]]);
296 indicesNew.push_back(ind);
299 this->m_IndicesInShells->push_back(indicesNew);
303 template <
class TPixelType>
304 std::vector<typename SamplingScheme3D<TPixelType>::STDVectorType>
309 std::vector<STDVectorType> radiusVectors;
310 if (m_IndicesInShells->size()==0)
314 for (
int i = 0; i < m_RadiusVector->size(); i += 1 )
316 double radius = (*m_RadiusVector)[i];
318 for ( j = 0; j < radiusVectors.size(); j += 1 )
320 if (radius>=radiusMin[j]-m_RadiusThresholdSingleShell && radius<=radiusMax[j]+m_RadiusThresholdSingleShell)
322 radiusVectors[j].push_back(radius);
323 (*m_IndicesInShells)[j].push_back(i);
324 if (radius<radiusMin[j])
325 radiusMin[j] = radius;
326 else if (radius>radiusMax[j])
327 radiusMax[j] = radius;
331 if (j==radiusVectors.size())
334 radiusVecTemp.push_back(radius);
335 radiusVectors.push_back(radiusVecTemp);
337 radiusIndexTemp.push_back(i);
338 m_IndicesInShells->push_back(radiusIndexTemp);
339 radiusMin.push_back(radius);
340 radiusMax.push_back(radius);
345 for (
int j = 0; j < radiusVectors.size(); j += 1 )
347 itkAssertOrThrowMacro(radiusMax[j]-radiusMin[j]<100.0,
"the range of radius values is larger than 100, which can not be in the same shell");
352 for (
int i = 0; i < m_IndicesInShells->size(); i += 1 )
356 for (
int j = 0; j < indexTemp.size(); j += 1 )
358 radiusVecTemp.push_back((*m_RadiusVector)[ indexTemp[j] ]);
360 radiusVectors.push_back(radiusVecTemp);
363 return radiusVectors;
366 template <
class TPixelType>
372 std::vector<STDVectorType> radiusVectors = GroupRadiusValues();
374 for (
int j = 0; j < radiusVectors.size(); j += 1 )
377 for (
int k = 0; k < radiusVectors[j].size(); k += 1 )
378 radiusMean += radiusVectors[j][k];
379 radiusMean /= radiusVectors[j].size();
380 for (
int k = 0; k < radiusVectors[j].size(); k += 1 )
382 (*m_RadiusVector)[(*m_IndicesInShells)[j][k] ] = radiusMean;
388 template <
class TPixelType>
392 const int flipx,
const int flipy,
const int flipz,
const bool need_normalize)
395 m_OrientationsCartesian = utl::ReadGrad<double>(gradFile, NoSymmetricDuple,
CARTESIAN_TO_CARTESIAN, flipx, flipy, flipz, need_normalize);
396 utl::UtlMatrixToPointsContainer<double, Superclass>(*m_OrientationsCartesian, *
this);
397 std::vector<int> indicesTmp;
399 for (
int j = 0; j < this->size(); j += 1 )
400 indicesTmp.push_back(j);
401 m_IndicesInShells->push_back(indicesTmp);
402 this->NormalizeDirections();
406 template <
class TPixelType>
410 const int flipx,
const int flipy,
const int flipz,
const bool need_normalize)
416 std::vector<int> indicesTmp;
419 for (
int i = 0; i < gradFileVec.size(); i += 1 )
421 matrix = utl::ReadGrad<double>(gradFileVec[i], NoSymmetricDuple,
CARTESIAN_TO_CARTESIAN, flipx, flipy, flipz, need_normalize);
423 utl::UtlMatrixToPointsContainer<double, Superclass>(*matrix, *tmpThis);
425 for (
int j = 0; j < tmpThis->size(); j += 1 )
427 this->push_back((*tmpThis)[j] );
428 indicesTmp.push_back( ind++ );
430 m_IndicesInShells->push_back(indicesTmp);
433 this->NormalizeDirections();
437 template <
class TPixelType >
445 for (
int i = 0; i < numberOfPoints.size(); i += 1 )
447 std::vector<int> indicesTmp;
448 for (
int j = 0; j < numberOfPoints[i]; j += 1 )
451 point[0]=pp[0]; point[1]=pp[1]; point[2]=pp[2];
452 this->push_back(point);
453 indicesTmp.push_back(ii++);
455 m_IndicesInShells->push_back(indicesTmp);
460 template <
class TPixelType>
466 point[0]=x; point[1]=y; point[2]=z;
467 AppendOrientation(point, shell);
470 template <
class TPixelType>
475 this->push_back(point);
479 int num = GetNumberOfSamples();
482 if (m_IndicesInShells->size()>shell)
483 (*m_IndicesInShells)[shell].push_back(num);
484 if (m_IndicesInShells->size()==shell)
487 indexVec.push_back(num);
488 m_IndicesInShells->push_back(indexVec);
490 utlSAException(m_IndicesInShells->size()<shell)(m_IndicesInShells->size())(shell).msg(
"wrong shell index");
494 utlSAException(m_IndicesInShells->size()>1)(m_IndicesInShells->size()).msg(
"need to set shell index, because there are more than 1 shell");
495 if (m_IndicesInShells->size()==1)
496 (*m_IndicesInShells)[0].push_back(num);
501 template <
class TPixelType>
507 point[0]=x; point[1]=y; point[2]=z;
508 AppendOrientation(point, shell);
509 m_RadiusVector->push_back(radius);
513 template <
class TPixelType>
518 unsigned int num = GetNumberOfSamples();
520 double x,y,z, x1,y1,z1, dot;
521 for (
unsigned int i = 0; i < num; i += 1 )
523 result->operator()(i, i) = 1.0;
524 x = this->operator[](i)[0];
525 y = this->operator[](i)[1];
526 z = this->operator[](i)[2];
527 for (
int j = 0; j < i; j += 1 )
529 x1 = this->operator[](j)[0];
530 y1 = this->operator[](j)[1];
531 z1 = this->operator[](j)[2];
532 dot = x*x1 + y*y1 + z*z1;
533 if (dot<0 && isAbsolute)
534 result->operator()(i,j) = -dot;
536 result->operator()(i,j) = dot;
537 result->operator()(j,i) = result->operator()(i,j);
543 template <
class TPixelType>
548 double temp, xi, yi, zi, xj, yj, zj;
549 unsigned int num = GetNumberOfSamples();
551 bool orderEqual2 =
std::abs(order-2)<1e-8 ?
true :
false;
552 for(
unsigned int i = 0; i < num; i++)
558 for (
unsigned int j = 0; j< i; j += 1 )
563 double dot = xi*xj + yi*yj + zi*zj;
564 double result1 = 2+2*dot;
565 double result2 = 2-2*dot;
566 utlWarning(result1<1e-8 || result2<1e-8,
"identical directions, d1=("<<xi<<
","<<yi<<
","<<zi<<
") , d2=("<<xj<<
","<<yj<<
","<<zj<<
")");
567 temp = (!orderEqual2) ? (1.0/std::pow(result1, order*0.5) + 1.0/std::pow(result2, order*0.5)) : (1.0/result1 + 1.0/result2);
568 result->operator()(i,j) = temp;
569 result->operator()(j,i) = temp;
575 template <
class TPixelType>
582 for (
int i = 0; i < dist.size(); ++i )
586 double area = 1-std::cos(dist[i]/2.0);
594 template <
class TPixelType>
599 STDVectorType dist = CalculateMinDistanceInShell(shellIndex, isSymmetric);
601 for (
int i = 0; i < dist.size(); ++i )
603 double area = 1-std::cos(dist[i]/2.0);
611 template <
class TPixelType>
619 for (
int i = 0; i < dist.size(); ++i )
624 pdf[i] = 1-std::cos(dist[i]/2.0);
629 pdf.back()= 1.0 - sum_pdf;
634 template <
class TPixelType>
639 STDVectorType dist = CalculateMinDistanceInShell(shellIndex, isSymmetric);
642 for (
int i = 0; i < dist.size(); ++i )
644 pdf[i] = 1-std::cos(dist[i]/2.0);
649 pdf.back()= 1.0 - sum_pdf;
653 template <
class TPixelType>
658 unsigned int num = grad.Rows();
659 unsigned int N = gradTess.Rows();
661 MatrixType dotMat = gradTess * grad.GetTranspose();
662 std::vector<int> indices(N,-1);
663 for (
int i = 0; i < N; ++i )
666 for (
int j = 0; j < num; ++j )
668 double dot = dotMat(i,j);
670 dot = std::fabs(dot);
682 for (
int i = 0; i < N; ++i )
683 distNum[indices[i]] += 1;
686 distNum /= (double)N;
691 template <
class TPixelType>
699 return CalculateVoronoiEntropy(*grad, *gradT4, isSymmetric);
702 template <
class TPixelType>
709 MatrixPointer grad = GetOrientationsCartesianInShell(shellIndex);
710 return CalculateVoronoiEntropy(*grad, *gradT4, isSymmetric);
713 template <
class TPixelType>
719 unsigned int num = GetNumberOfSamples();
723 double x = (*this)[index][0];
724 double y = (*this)[index][1];
725 double z = (*this)[index][2];
727 for(
unsigned int i = 0; i < num; i++)
732 double xi = (*this)[i][0];
733 double yi = (*this)[i][1];
734 double zi = (*this)[i][2];
735 double dot = x*xi + y*yi + z*zi;
736 if (isSymmetric && dot<0 )
746 template <
class TPixelType>
752 unsigned int num = GetNumberOfSamplesInShell(shellIndex);
756 double x = (*this)[sampleIndex][0];
757 double y = (*this)[sampleIndex][1];
758 double z = (*this)[sampleIndex][2];
760 for(
unsigned int i = 0; i < num; i++)
762 unsigned int ii = (*m_IndicesInShells)[shellIndex][i];
766 double xi = (*this)[ii][0];
767 double yi = (*this)[ii][1];
768 double zi = (*this)[ii][2];
769 double dot = x*xi + y*yi + z*zi;
770 if (isSymmetric && dot<0 )
780 template <
class TPixelType>
785 double dotMax = CalculateMaxDot(index, isSymmetric);
787 if(dotMax >= -1.0 -
M_EPS && dotMax <= -1.0 +
M_EPS)
789 else if(dotMax <= 1.0 + M_EPS && dotMax >= 1.0 -
M_EPS)
792 angle = std::acos(dotMax);
796 template <
class TPixelType>
801 double dotMax = CalculateMaxDotInShell(index, isSymmetric);
803 if(dotMax >= -1.0 -
M_EPS && dotMax <= -1.0 +
M_EPS)
805 else if(dotMax <= 1.0 + M_EPS && dotMax >= 1.0 -
M_EPS)
808 angle = std::acos(dotMax);
812 template <
class TPixelType>
818 for(
unsigned int i = 0; i < GetNumberOfSamples(); i++)
820 double angle = CalculateMinDistance(i, isSymmetric);
821 angleVec.push_back(angle);
826 template <
class TPixelType>
832 unsigned int num = GetNumberOfSamplesInShell(shellIndex);
833 for(
unsigned int i = 0; i < num; i++)
835 unsigned int ii = (*m_IndicesInShells)[shellIndex][i];
836 double angle = CalculateMinDistanceInShell(ii, shellIndex, isSymmetric);
837 angleVec.push_back(angle);
842 template <
class TPixelType>
845 ::GetNumbers(
int& numberUniqueSamples,
int& numberAntipodalSamples,
int& numberRepeatedSamples )
const 847 double xi, yi, zi, xj, yj, zj;
848 unsigned int num = GetNumberOfSamples();
849 numberUniqueSamples=0, numberAntipodalSamples=0, numberRepeatedSamples=0;
850 for(
unsigned int i = 0; i < num; ++i)
856 for (
unsigned int j = 0; j < i; ++j )
861 double resultSame = (xi-xj)*(xi-xj) + (yi-yj)*(yi-yj) + (zi-zj)*(zi-zj);
862 double resultAntipodal = (xi+xj)*(xi+xj) + (yi+yj)*(yi+yj) + (zi+zj)*(zi+zj);
863 if (resultSame<1e-8 || resultAntipodal<1e-8)
866 numberRepeatedSamples++;
867 if (resultAntipodal<1e-8)
868 numberAntipodalSamples++;
871 numberUniqueSamples++;
875 template <
class TPixelType>
881 double xi, yi, zi, xj, yj, zj;
883 unsigned int num = GetNumberOfSamples();
884 for(
unsigned int i = 0; i < num; i++)
889 for (
unsigned int j = 0; (countHalf? (j < i) : (j< num) ); j += 1 )
896 double result1 = (xi-xj)*(xi-xj) + (yi-yj)*(yi-yj) + (zi-zj)*(zi-zj);
897 double result2 = (xi+xj)*(xi+xj) + (yi+yj)*(yi+yj) + (zi+zj)*(zi+zj);
898 utlWarning(result1<1e-8 || result2<1e-8,
"identical directions, d1=("<<xi<<
","<<yi<<
","<<zi<<
") , d2=("<<xj<<
","<<yj<<
","<<zj<<
")");
899 double temp = (order!=2) ? (1.0/std::pow(result1, order*0.5) + 1.0/std::pow(result2, order*0.5)) : (1.0/result1 + 1.0/result2);
904 if (isNormalize && kk>0)
905 result /= double(kk);
909 template <
class TPixelType>
915 double xi, yi, zi, xj, yj, zj;
917 unsigned int num = GetNumberOfSamplesInShell(shellIndex);
918 for(
unsigned int i = 0; i < num; i++)
920 unsigned int ii = (*m_IndicesInShells)[shellIndex][i];
924 for (
unsigned int j = 0; (countHalf? (j < i) : (j< num) ); j += 1 )
928 unsigned int jj = (*m_IndicesInShells)[shellIndex][j];
932 double result1 = (xi-xj)*(xi-xj) + (yi-yj)*(yi-yj) + (zi-zj)*(zi-zj);
933 double result2 = (xi+xj)*(xi+xj) + (yi+yj)*(yi+yj) + (zi+zj)*(zi+zj);
934 utlWarning(result1<1e-8 || result2<1e-8,
"identical directions, d1=("<<xi<<
","<<yi<<
","<<zi<<
") , d2=("<<xj<<
","<<yj<<
","<<zj<<
")");
935 double temp = (order!=2) ? (1.0/std::pow(result1, order*0.5) + 1.0/std::pow(result2, order*0.5)) : (1.0/result1 + 1.0/result2);
940 if (isNormalize && kk>0)
941 result /= double(kk);
945 template <
class TPixelType>
950 double bound = numberOfPoints*
M_PI/(6.0*(numberOfPoints-2.0));
951 bound = -2.0*std::sin(bound)/(std::cos(2*bound)-1);
952 bound = std::sqrt( 4 - bound*bound );
953 if (isSphericalDistance)
954 bound = std::acos((2.0-bound*bound)/2.0);
958 template <
class TPixelType>
963 Superclass::PrintSelf(os, indent);
964 PrintVar3(
true, m_Tau, m_DeltaSmall, m_DeltaBig, os<<indent);
966 utl::PointsContainerToUtlMatrix<Superclass, double>(*
this, mat);
968 if (m_OrientationsCartesian->Rows()!=0)
969 utl::PrintUtlMatrix(*m_OrientationsCartesian,
"m_OrientationsCartesian",
" ", os<<indent);
970 else if (m_OrientationsSpherical->Rows()!=0)
971 utl::PrintUtlMatrix(*m_OrientationsSpherical,
"m_OrientationsSpherical",
" ", os<<indent);
974 if (GetNumberOfShells()>0)
976 os << indent << GetNumberOfShells() <<
" shells" << std::endl << std::flush;
977 for (
int i = 0; i < GetNumberOfShells(); i += 1 )
979 os << indent <<
"shell " << i <<
" : ";
983 os << indent <<
"m_RadiusThresholdSingleShell = " << m_RadiusThresholdSingleShell << std::endl << std::flush;
void NormalizeDirections()
void AppendOrientationAndRadiusValue(const double x, const double y, const double z, const double radius, const int shell=-1)
NDArray<T,1> is a vector class which uses blas mkl.
MatrixPointer GetOrientationsSphericalInShell(const unsigned int shellIndex)
void GetNumbers(int &numberUniqueSamples, int &numberAntipodalSamples, int &numberRepeatedSamples) const
double CalculateMaxDot(const unsigned int index, const bool isSymmetric=true) const
static MatrixPointer GetGrad(const int tessorder, const int NoSymmetricDuple=DIRECTION_NODUPLICATE, const int mode=CARTESIAN_TO_SPHERICAL, const int flipx=DIRECTION_NOFLIP, const int flipy=DIRECTION_NOFLIP, const int flipz=DIRECTION_NOFLIP, const bool need_normalize=true)
helper functions specifically used in dmritool
static double CalculateMinDistanceUpperBound(const unsigned int numberOfPoints, const bool isSphericalDistance=true)
double CalculateSphericalCodeEntropy(const bool isSymmetric=true) const
void PrintUtlMatrix(const NDArray< T, 2 > &mat, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout)
void SetOrientationsCartesian(const MatrixPointer mat)
#define utlException(cond, expout)
double CalculateElectrostaticEnergyInShell(const unsigned int shellIndex, const double order=2.0, const bool isNormalize=true, const bool countHalf=true) const
double CalculateElectrostaticEnergy(const double order=2.0, const bool isNormalize=true, const bool countHalf=true) const
MatrixPointer GetOrientationsCartesian(const bool alwarysReCalculate=false)
void SetRadiusVector(const STDVectorPointer radiusVec)
static double CalculateVoronoiEntropy(const MatrixType &grad, const MatrixType &gradTess, const bool isSymmetric=true)
const T & max(const T &a, const T &b)
Return the maximum between a and b.
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
NDArray< T, 2 > CartesianToSpherical(const NDArray< T, 2 > &in)
std::vector< IndexVectorType > Index2DVectorType
void ReadOrientationFileList(const std::vector< std::string > &gradFileVec, const int NoSymmetricDuple=DIRECTION_NODUPLICATE, const int flipx=DIRECTION_NOFLIP, const int flipy=DIRECTION_NOFLIP, const int flipz=DIRECTION_NOFLIP, const bool need_normalize=true)
std::vector< STDVectorType > GroupRadiusValues()
LightObject::Pointer InternalClone() const ITK_OVERRIDE
virtual void CorrectRadiusValues()
double CalculatePackingDensityInShell(const unsigned int shellIndex, const bool isSymmetric=true) const
T abs(const T x)
template version of the fabs function
#define utlGlobalException(cond, expout)
double Entropy(const VectorType &pdfVec, const int N)
std::vector< double > STDVectorType
std::vector< double > RandomPointInSphere(const bool hemis)
std::vector< int > IndexVectorType
Point< TPixelType, 3 > PointType
double CalculateMaxDotInShell(const unsigned int sampleIndex, const unsigned int shellIndex, const bool isSymmetric=true) const
void ReadOrientationFile(const std::string &gradFile, const int NoSymmetricDuple=DIRECTION_NODUPLICATE, const int flipx=DIRECTION_NOFLIP, const int flipy=DIRECTION_NOFLIP, const int flipz=DIRECTION_NOFLIP, const bool need_normalize=true)
this class describes sampling in a 3D space (Q space or R space).
#define utlWarning(cond, expout)
utl_shared_ptr< MatrixType > MatrixPointer
#define utlSAException(expr)
SmartPointer< Self > Pointer
void SetOrientationsSpherical(const MatrixPointer mat)
void RemoveSamplesNotIndexed()
static void Initialize(const int tessorder)
void PrintVector(const std::vector< T > &vec, const std::string &str="", const char *separate=" ", std::ostream &os=std::cout, bool showStats=true)
void GenerateFromRandomPoints(const std::vector< int > &numberOfPoints)
double CalculateSphericalCodeEntropyInShell(const unsigned int shellIndex, const bool isSymmetric=true) const
NDArray< T, 2 > SphericalToCartesian(const NDArray< T, 2 > &in)
utl_shared_ptr< STDVectorType > STDVectorPointer
#define PrintVar3(cond, var1, var2, var3, os)
MatrixPointer CalculateElectrostaticEnergyMatrix(const double order=2.0) const
double CalculateMinDistanceInShell(const unsigned int sampleIndex, const unsigned int shellIndex, const bool isSymmetric=true) const
double CalculateVoronoiEntropyInShell(const unsigned int shellIndex, const int tess=7, const bool isSymmetric=true)
MatrixPointer GetOrientationsCartesianInShell(const unsigned int shellIndex) const
utl_shared_ptr< Index2DVectorType > Index2DVectorPointer
MatrixPointer CalculateInnerProductMatrix(const bool isAbsolute=true) const
MatrixPointer GetOrientationsSpherical(const bool alwarysReCalculate=false)
void AppendOrientation(const double x, const double y, const double z, const int shell=-1)
double CalculateMinDistance(const unsigned int index, const bool isSymmetric=true) const
double CalculatePackingDensity(const bool isSymmetric=true) const
STDVectorPointer GetRadiusVectorInShell(unsigned int shellIndex)