18 #ifndef itkPhasedArray3DSpecialCoordinatesImage_h 19 #define itkPhasedArray3DSpecialCoordinatesImage_h 94 template<
typename TPixel >
187 template<
typename TCoordRep,
typename TIndexRep >
193 const double maxAzimuth = region.
GetSize(0) - 1;
194 const double maxElevation = region.
GetSize(1) - 1;
199 if( point[2] != 0.0 )
201 azimuth = std::atan(point[0] / point[2]);
202 elevation = std::atan(point[1] / point[2]);
204 const TCoordRep radius = std::sqrt(point[0] * point[0]
205 + point[1] * point[1]
206 + point[2] * point[2]);
210 + ( maxAzimuth / 2.0 ) );
212 + ( maxElevation / 2.0 ) );
217 const bool isInside = region.
IsInside(index);
226 template<
typename TCoordRep >
229 IndexType & index)
const 232 const double maxAzimuth = region.
GetSize(0) - 1;
233 const double maxElevation = region.
GetSize(1) - 1;
239 if( point[2] != 0.0 )
241 azimuth = std::atan(point[0] / point[2]);
242 elevation = std::atan(point[1] / point[2]);
244 const TCoordRep radius = std::sqrt(point[0] * point[0]
245 + point[1] * point[1]
246 + point[2] * point[2]);
249 index[0] =
static_cast< IndexValueType
>(
251 + ( maxAzimuth / 2.0 ) );
252 index[1] =
static_cast< IndexValueType
>(
254 + ( maxElevation / 2.0 ) );
255 index[2] =
static_cast< IndexValueType
>(
260 const bool isInside = region.
IsInside(index);
269 template<
typename TCoordRep,
typename TIndexRep >
275 const double maxAzimuth = region.
GetSize(0) - 1;
276 const double maxElevation = region.
GetSize(1) - 1;
280 const TCoordRep azimuth = ( index[0] - ( maxAzimuth / 2.0 ) )
282 const TCoordRep elevation = ( index[1] - ( maxElevation / 2.0 ) )
287 const TCoordRep tanOfAzimuth = std::tan(azimuth);
288 const TCoordRep tanOfElevation = std::tan(elevation);
290 point[2] =
static_cast< TCoordRep
>( radius
292 + tanOfAzimuth * tanOfAzimuth
293 + tanOfElevation * tanOfElevation) );
294 point[1] =
static_cast< TCoordRep
>( point[2] * tanOfElevation );
295 point[0] =
static_cast< TCoordRep
>( point[2] * tanOfAzimuth );
303 template<
typename TCoordRep >
305 const IndexType & index,
309 const double maxAzimuth = region.
GetSize(0) - 1;
310 const double maxElevation = region.
GetSize(1) - 1;
314 const TCoordRep azimuth =
315 (
static_cast< double >( index[0] ) - ( maxAzimuth / 2.0 ) )
317 const TCoordRep elevation =
318 (
static_cast< double >( index[1] ) - ( maxElevation / 2.0 ) )
320 const TCoordRep radius =
325 const TCoordRep tanOfAzimuth = std::tan(azimuth);
326 const TCoordRep tanOfElevation = std::tan(elevation);
328 point[2] =
static_cast< TCoordRep
>(
330 1.0 + tanOfAzimuth * tanOfAzimuth + tanOfElevation * tanOfElevation) );
331 point[1] =
static_cast< TCoordRep
>( point[2] * tanOfElevation );
332 point[0] =
static_cast< TCoordRep
>( point[2] * tanOfAzimuth );
336 itkSetMacro(AzimuthAngularSeparation,
double);
339 itkSetMacro(ElevationAngularSeparation,
double);
342 itkSetMacro(RadiusSampleSize,
double);
345 itkSetMacro(FirstSampleDistance,
double);
347 template<
typename TCoordRep >
352 template<
typename TCoordRep >
390 void operator=(
const Self &) ITK_DELETE_FUNCTION;
399 #ifndef ITK_MANUAL_INSTANTIATION 400 #include "itkPhasedArray3DSpecialCoordinatesImage.hxx" Superclass::IndexType IndexType
void operator=(const Self &) ITK_DELETE_FUNCTION
Superclass::SpacingType SpacingType
Superclass::SizeType SizeType
Superclass::SpacingType SpacingType
bool TransformPhysicalPointToIndex(const Point< TCoordRep, 3 > &point, IndexType &index) const
bool IsInside(const IndexType &index) const
virtual const RegionType & GetLargestPossibleRegion() const
virtual ~PhasedArray3DSpecialCoordinatesImage()
Superclass::PointType PointType
SmartPointer< const Self > ConstPointer
double m_AzimuthAngularSeparation
Superclass::RegionType RegionType
PixelContainer::Pointer PixelContainerPointer
Superclass::RegionType RegionType
double m_FirstSampleDistance
Templated n-dimensional nonrectilinear-coordinate image base class.
void TransformLocalVectorToPhysicalVector(FixedArray< TCoordRep, 3 > &) const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Implements a weak reference to an object.
AccessorType GetPixelAccessor(void)
Simulate a standard C array with copy semnatics.
SpecialCoordinatesImage< TPixel, 3 > Superclass
Provides accessor interfaces to Get pixels and is meant to be used on pointers contained within Neigh...
static ITK_CONSTEXPR double pi_over_2
void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TIndexRep, 3 > &index, Point< TCoordRep, 3 > &point) const
Superclass::PointType PointType
DefaultPixelAccessor< PixelType > AccessorType
const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
const SizeType & GetSize() const
const AccessorType GetPixelAccessor(void) const
Provides a common API for pixel accessors for Image and VectorImage.
static const unsigned int ImageDimension
DefaultPixelAccessorFunctor< Self > AccessorFunctorType
SizeType::SizeValueType SizeValueType
WeakPointer< const Self > ConstWeakPointer
void TransformIndexToPhysicalPoint(const IndexType &index, Point< TCoordRep, 3 > &point) const
PixelContainer::ConstPointer PixelContainerConstPointer
double m_RadiusSampleSize
A templated class holding a point in n-Dimensional image space.
double m_ElevationAngularSeparation
Superclass::OffsetType OffsetType
void PrintSelf(std::ostream &os, Indent indent) const override
Control indentation during Print() invocation.
Templated 3D nonrectilinear-coordinate image class for phased-array "range" images.
bool TransformPhysicalPointToContinuousIndex(const Point< TCoordRep, 3 > &point, ContinuousIndex< TIndexRep, 3 > &index) const
Get the continuous index from a physical point.
ImportImageContainer< SizeValueType, PixelType > PixelContainer
Superclass::IOPixelType IOPixelType
SmartPointer< Self > Pointer
Give access to partial aspects a type.
A templated class holding a geometric point in n-Dimensional space.
NeighborhoodAccessorFunctor< Self > NeighborhoodAccessorFunctorType
Superclass::IndexValueType IndexValueType
PhasedArray3DSpecialCoordinatesImage Self
Superclass::SizeType SizeType
IndexType::IndexValueType IndexValueType
static ITK_CONSTEXPR double pi
PhasedArray3DSpecialCoordinatesImage()
NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
Superclass::SizeValueType SizeValueType
Superclass::IndexType IndexType
Defines an itk::Image front-end to a standard C-array.
void TransformPhysicalVectorToLocalVector(const FixedArray< TCoordRep, 3 > &, FixedArray< TCoordRep, 3 > &) const
Superclass::OffsetType OffsetType