18 #ifndef itkPhasedArray3DSpecialCoordinatesImage_h
19 #define itkPhasedArray3DSpecialCoordinatesImage_h
23 #include "vnl/vnl_math.h"
92 template<
typename TPixel >
181 template<
typename TCoordRep >
187 double maxAzimuth = region.
GetSize(0) - 1;
188 double maxElevation = region.
GetSize(1) - 1;
191 TCoordRep azimuth = std::atan(point[0] / point[2]);
192 TCoordRep elevation = std::atan(point[1] / point[2]);
193 TCoordRep radius = std::sqrt(point[0] * point[0]
194 + point[1] * point[1]
195 + point[2] * point[2]);
199 + ( maxAzimuth / 2.0 ) );
201 + ( maxElevation / 2.0 ) );
206 const bool isInside = region.
IsInside(index);
215 template<
typename TCoordRep >
221 double maxAzimuth = region.
GetSize(0) - 1;
222 double maxElevation = region.
GetSize(1) - 1;
226 TCoordRep azimuth = std::atan(point[0] / point[2]);
227 TCoordRep elevation = std::atan(point[1] / point[2]);
228 TCoordRep radius = std::sqrt(point[0] * point[0]
229 + point[1] * point[1]
230 + point[2] * point[2]);
235 + ( maxAzimuth / 2.0 ) );
238 + ( maxElevation / 2.0 ) );
244 const bool isInside = region.
IsInside(index);
253 template<
typename TCoordRep >
259 double maxAzimuth = region.
GetSize(0) - 1;
260 double maxElevation = region.
GetSize(1) - 1;
264 TCoordRep azimuth = ( index[0] - ( maxAzimuth / 2.0 ) )
266 TCoordRep elevation = ( index[1] - ( maxElevation / 2.0 ) )
271 TCoordRep tanOfAzimuth = std::tan(azimuth);
272 TCoordRep tanOfElevation = std::tan(elevation);
274 point[2] =
static_cast< TCoordRep
>( radius
276 + tanOfAzimuth * tanOfAzimuth
277 + tanOfElevation * tanOfElevation) );
278 point[1] =
static_cast< TCoordRep
>( point[2] * tanOfElevation );
279 point[0] =
static_cast< TCoordRep
>( point[2] * tanOfAzimuth );
287 template<
typename TCoordRep >
293 double maxAzimuth = region.
GetSize(0) - 1;
294 double maxElevation = region.
GetSize(1) - 1;
299 (
static_cast< double >( index[0] ) - ( maxAzimuth / 2.0 ) )
301 TCoordRep elevation =
302 (
static_cast< double >( index[1] ) - ( maxElevation / 2.0 ) )
309 TCoordRep tanOfAzimuth = std::tan(azimuth);
310 TCoordRep tanOfElevation = std::tan(elevation);
312 point[2] =
static_cast< TCoordRep
>(
314 1.0 + tanOfAzimuth * tanOfAzimuth + tanOfElevation * tanOfElevation) );
315 point[1] =
static_cast< TCoordRep
>( point[2] * tanOfElevation );
316 point[0] =
static_cast< TCoordRep
>( point[2] * tanOfAzimuth );
320 itkSetMacro(AzimuthAngularSeparation,
double);
323 itkSetMacro(ElevationAngularSeparation,
double);
326 itkSetMacro(RadiusSampleSize,
double);
329 itkSetMacro(FirstSampleDistance,
double);
331 template<
typename TCoordRep >
336 template<
typename TCoordRep >
369 #ifndef ITK_MANUAL_INSTANTIATION
370 #include "itkPhasedArray3DSpecialCoordinatesImage.hxx"
Superclass::IndexType IndexType
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
An image region represents a structured region of data.
Superclass::RegionType RegionType
double m_FirstSampleDistance
Templated n-dimensional nonrectilinear-coordinate image base class.
void TransformLocalVectorToPhysicalVector(FixedArray< TCoordRep, 3 > &) const
Implements a weak reference to an object.
Simulate a standard C array with copy semnatics.
SpecialCoordinatesImage< TPixel, 3 > Superclass
void TransformContinuousIndexToPhysicalPoint(const ContinuousIndex< TCoordRep, 3 > &index, Point< TCoordRep, 3 > &point) const
Superclass::PointType PointType
bool TransformPhysicalPointToContinuousIndex(const Point< TCoordRep, 3 > &point, ContinuousIndex< TCoordRep, 3 > &index) const
Get the continuous index from a physical point.
DefaultPixelAccessor< PixelType > AccessorType
const SizeType & GetSize() const
void operator=(const Self &)
Provides a common API for pixel accessors for Image and VectorImage.
void PrintSelf(std::ostream &os, Indent indent) const override
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
Control indentation during Print() invocation.
Templated 3D nonrectilinear-coordinate image class for phased-array "range" images.
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.
Superclass::IndexValueType IndexValueType
PhasedArray3DSpecialCoordinatesImage Self
Superclass::SizeType SizeType
Base class for all data objects in ITK.
IndexType::IndexValueType IndexValueType
PhasedArray3DSpecialCoordinatesImage()
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