Xmipp  v3.23.11-Nereus
Public Member Functions | Public Attributes | List of all members
ExtremaFinder::ExtremaFinderSettings Class Reference

#include <aextrema_finder.h>

Collaboration diagram for ExtremaFinder::ExtremaFinderSettings:
Collaboration graph
[legend]

Public Member Functions

Point3D< size_t > getCenter () const
 
void check () const
 

Public Attributes

std::vector< HW * > hw
 
SearchType searchType
 
ResultType resultType
 
Dimensions dims = Dimensions(0)
 
size_t batch = 0
 
float maxDistFromCenter = 0.f
 

Detailed Description

Definition at line 58 of file aextrema_finder.h.

Member Function Documentation

◆ check()

void ExtremaFinder::ExtremaFinderSettings::check ( ) const
inline

Definition at line 71 of file aextrema_finder.h.

71  {
72  if (0 == hw.size()) {
73  REPORT_ERROR(ERR_VALUE_INCORRECT, "HW contains zero (0) devices");
74  }
75  if ( ! dims.isValid()) {
76  REPORT_ERROR(ERR_LOGIC_ERROR, "Dimensions are invalid (contain 0)");
77  }
78  if (0 == batch) {
79  REPORT_ERROR(ERR_LOGIC_ERROR, "Batch is zero (0)");
80  }
83  const auto center = getCenter();
84  if (0 == maxDistFromCenter) {
85  REPORT_ERROR(ERR_LOGIC_ERROR, "'maxDistFromCenter' is set to zero (0)");
86  }
87  if (dims.is1D()) {
88  if (maxDistFromCenter >= center.x) {
89  REPORT_ERROR(ERR_LOGIC_ERROR, "'maxDistFromCenter' is bigger than half of the signal's X dimension");
90  }
91  } else if (dims.is2D()) {
92  if ((maxDistFromCenter >= center.x)
93  || (maxDistFromCenter >= center.y)) {
94  REPORT_ERROR(ERR_LOGIC_ERROR, "'maxDistFromCenter' is bigger than half of the signal's X or Y dimensions");
95  }
96  } else {
97  if ((maxDistFromCenter >= center.x)
98  || (maxDistFromCenter >= center.y)
99  || (maxDistFromCenter >= center.z)) {
100  REPORT_ERROR(ERR_LOGIC_ERROR, "'maxDistFromCenter' is bigger than half of the signal's X, Y or Z dimensions");
101  }
102  }
103  }
104  }
Point3D< size_t > getCenter() const
CUDA_HD constexpr bool is2D() const
Definition: dimensions.h:162
#define REPORT_ERROR(nerr, ErrormMsg)
Definition: xmipp_error.h:211
constexpr bool is1D() const
Definition: dimensions.h:157
constexpr bool isValid() const
Definition: dimensions.h:138
Incorrect value received.
Definition: xmipp_error.h:195
Some logical error in the pipeline.
Definition: xmipp_error.h:147

◆ getCenter()

Point3D<size_t> ExtremaFinder::ExtremaFinderSettings::getCenter ( ) const
inline

Definition at line 67 of file aextrema_finder.h.

67  {
68  return Point3D<size_t>(dims.x() / 2, dims.y() / 2, dims.z() / 2);
69  }
CUDA_HD constexpr size_t z() const
Definition: dimensions.h:69
CUDA_HD constexpr size_t x() const
Definition: dimensions.h:51
CUDA_HD constexpr size_t y() const
Definition: dimensions.h:60

Member Data Documentation

◆ batch

size_t ExtremaFinder::ExtremaFinderSettings::batch = 0

Definition at line 64 of file aextrema_finder.h.

◆ dims

Dimensions ExtremaFinder::ExtremaFinderSettings::dims = Dimensions(0)

Definition at line 63 of file aextrema_finder.h.

◆ hw

std::vector<HW*> ExtremaFinder::ExtremaFinderSettings::hw

Definition at line 60 of file aextrema_finder.h.

◆ maxDistFromCenter

float ExtremaFinder::ExtremaFinderSettings::maxDistFromCenter = 0.f

Definition at line 65 of file aextrema_finder.h.

◆ resultType

ResultType ExtremaFinder::ExtremaFinderSettings::resultType

Definition at line 62 of file aextrema_finder.h.

◆ searchType

SearchType ExtremaFinder::ExtremaFinderSettings::searchType

Definition at line 61 of file aextrema_finder.h.


The documentation for this class was generated from the following file: