18#ifndef itkPhasedArray3DSpecialCoordinatesImage_h
19#define itkPhasedArray3DSpecialCoordinatesImage_h
94template <
typename TPixel>
185 template <
typename TIndexRep,
typename TCoordinate>
190 const double maxAzimuth = region.
GetSize(0) - 1;
191 const double maxElevation = region.
GetSize(1) - 1;
198 azimuth = std::atan(point[0] / point[2]);
199 elevation = std::atan(point[1] / point[2]);
201 const TCoordinate radius = std::sqrt(point[0] * point[0] + point[1] * point[1] + point[2] * point[2]);
219 template <
typename TCoordinate,
typename TIndexRep>
220 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
235 template <
typename TCoordinate>
236 [[nodiscard]] IndexType
240 const double maxAzimuth = region.
GetSize(0) - 1;
241 const double maxElevation = region.
GetSize(1) - 1;
248 azimuth = std::atan(point[0] / point[2]);
249 elevation = std::atan(point[1] / point[2]);
251 const TCoordinate radius = std::sqrt(point[0] * point[0] + point[1] * point[1] + point[2] * point[2]);
269 template <
typename TCoordinate>
270 ITK_NODISCARD(
"Call the overload which has the point as the only parameter and returns the index")
285 template <
typename TCoordinate,
typename TIndexRep>
291 const double maxAzimuth = region.
GetSize(0) - 1;
292 const double maxElevation = region.
GetSize(1) - 1;
300 const TCoordinate tanOfAzimuth = std::tan(azimuth);
301 const TCoordinate tanOfElevation = std::tan(elevation);
304 static_cast<TCoordinate
>(radius / std::sqrt(1 + tanOfAzimuth * tanOfAzimuth + tanOfElevation * tanOfElevation));
305 point[1] =
static_cast<TCoordinate
>(point[2] * tanOfElevation);
306 point[0] =
static_cast<TCoordinate
>(point[2] * tanOfAzimuth);
310 template <
typename TCoordinate,
typename TIndexRep>
324 template <
typename TCoordinate>
329 const double maxAzimuth = region.
GetSize(0) - 1;
330 const double maxElevation = region.
GetSize(1) - 1;
338 const TCoordinate tanOfAzimuth = std::tan(azimuth);
339 const TCoordinate tanOfElevation = std::tan(elevation);
342 static_cast<TCoordinate
>(radius / std::sqrt(1.0 + tanOfAzimuth * tanOfAzimuth + tanOfElevation * tanOfElevation));
343 point[1] =
static_cast<TCoordinate
>(point[2] * tanOfElevation);
344 point[0] =
static_cast<TCoordinate
>(point[2] * tanOfAzimuth);
348 template <
typename TCoordinate>
358 itkSetMacro(AzimuthAngularSeparation,
double);
361 itkSetMacro(ElevationAngularSeparation,
double);
364 itkSetMacro(RadiusSampleSize,
double);
367 itkSetMacro(FirstSampleDistance,
double);
369 template <
typename TCoordinate>
374 template <
typename TCoordinate>
394 NeighborhoodAccessorFunctorType
401 const NeighborhoodAccessorFunctorType
430#ifndef ITK_MANUAL_INSTANTIATION
431# include "itkPhasedArray3DSpecialCoordinatesImage.hxx"
A templated class holding a point in n-Dimensional image space.
Provides a common API for pixel accessors for Image and VectorImage.
Give access to partial aspects a type.
Simulate a standard C array with copy semantics.
typename IndexType::IndexValueType IndexValueType
virtual const RegionType & GetLargestPossibleRegion() const
typename SizeType::SizeValueType SizeValueType
const SizeType & GetSize() const
Defines an itk::Image front-end to a standard C-array.
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
typename PixelContainer::ConstPointer PixelContainerConstPointer
WeakPointer< const Self > ConstWeakPointer
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
double m_AzimuthAngularSeparation
double m_RadiusSampleSize
~PhasedArray3DSpecialCoordinatesImage() override=default
typename PixelContainer::Pointer PixelContainerPointer
DefaultPixelAccessorFunctor< Self > AccessorFunctorType
NeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
ImportImageContainer< SizeValueType, PixelType > PixelContainer
double m_FirstSampleDistance
AccessorType GetPixelAccessor()
Point< TCoordinate, 3 > TransformIndexToPhysicalPoint(const IndexType &index) const
Point< TCoordinate, 3 > TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TIndexRep, 3 > &index) const
void TransformLocalVectorToPhysicalVector(FixedArray< TCoordinate, 3 > &) const
void TransformIndexToPhysicalPoint(const IndexType &index, Point< TCoordinate, 3 > &point) const
SmartPointer< Self > Pointer
ContinuousIndex< TIndexRep, 3 > TransformPhysicalPointToContinuousIndex(const Point< TCoordinate, 3 > &point) const
DefaultPixelAccessor< PixelType > AccessorType
PhasedArray3DSpecialCoordinatesImage()
SmartPointer< const Self > ConstPointer
static constexpr unsigned int ImageDimension
PhasedArray3DSpecialCoordinatesImage Self
const AccessorType GetPixelAccessor() const
double m_ElevationAngularSeparation
IndexType TransformPhysicalPointToIndex(const Point< TCoordinate, 3 > &point) const
SpecialCoordinatesImage< TPixel, 3 > Superclass
void PrintSelf(std::ostream &os, Indent indent) const override
void TransformPhysicalVectorToLocalVector(const FixedArray< TCoordinate, 3 > &, FixedArray< TCoordinate, 3 > &) const
void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TIndexRep, 3 > &index, Point< TCoordinate, 3 > &point) const
A templated class holding a geometric point in n-Dimensional space.
Implements transparent reference counting.
Size< VImageDimension > SizeType
Point< PointValueType, VImageDimension > PointType
ImageRegion< VImageDimension > RegionType
SpecialCoordinatesImage()=default
Offset< VImageDimension > OffsetType
Vector< SpacingValueType, VImageDimension > SpacingType
Index< VImageDimension > IndexType
Implements a weak reference to an object.
static constexpr double pi_over_2
static constexpr double pi
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....