![]() |
Orfeo Toolbox
3.16
|
Array class with size defined at construction time. More...
#include <itkArray.h>
Inheritance diagram for itk::Array< TValueType >:
Collaboration diagram for itk::Array< TValueType >:Public Types | |
| typedef Array | Self |
| typedef TValueType | ValueType |
| typedef vnl_vector< TValueType > | VnlVectorType |
Public Member Functions | |
| Array () | |
| Array (unsigned int dimension) | |
| Array (ValueType *data, unsigned int sz, bool LetArrayManageMemory=false) | |
| Array (const ValueType *data, unsigned int sz, bool LetArrayManageMemory=false) | |
| ~Array () | |
| void | Fill (TValueType const &v) |
| const TValueType & | GetElement (unsigned int i) const |
| unsigned int | GetNumberOfElements (void) const |
| unsigned int | GetSize (void) const |
| const Self & | operator= (const Self &rhs) |
| const Self & | operator= (const VnlVectorType &rhs) |
| void | SetData (TValueType *data, bool LetArrayManageMemory=false) |
| void | SetData (TValueType *data, unsigned int sz, bool LetArrayManageMemory=false) |
| void | SetElement (unsigned int i, const TValueType &value) |
| void | SetSize (unsigned int sz) |
| unsigned int | Size (void) const |
Private Attributes | |
| bool | m_LetArrayManageMemory |
Array class with size defined at construction time.
This class derives from the vnl_vector<> class. Its size is assigned at construction time (run time) and can not be changed afterwards except by using assignment to another Array.
The class is templated over the type of the elements.
Template parameters for class Array:
Definition at line 44 of file itkArray.h.
| typedef Array itk::Array< TValueType >::Self |
Definition at line 50 of file itkArray.h.
| typedef TValueType itk::Array< TValueType >::ValueType |
The element type stored at each location in the Array.
Definition at line 49 of file itkArray.h.
| typedef vnl_vector<TValueType> itk::Array< TValueType >::VnlVectorType |
Definition at line 51 of file itkArray.h.
| itk::Array< TValueType >::Array | ( | ) |
Default constructor. It is created with an empty array it has to be allocated later by assignment
Default constructor
Definition at line 28 of file itkArray.txx.
|
explicit |
Constructor with size. Size can only be changed by assignment
Constructor with size
Definition at line 37 of file itkArray.txx.
| itk::Array< TValueType >::Array | ( | ValueType * | datain, |
| unsigned int | sz, | ||
| bool | LetArrayManageMemory = false |
||
| ) |
Constructor that initializes array with contents from a user supplied buffer. The pointer to the buffer and the length is specified. By default, the array does not manage the memory of the buffer. It merely points to that location and it is the user's responsibility to delete it. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed.
Constructor with user specified data
Definition at line 45 of file itkArray.txx.
| itk::Array< TValueType >::Array | ( | const ValueType * | datain, |
| unsigned int | sz, | ||
| bool | LetArrayManageMemory = false |
||
| ) |
Constructor that initializes array with contents from a user supplied buffer. The pointer to the buffer and the length is specified. By default, the array does not manage the memory of the buffer. It merely points to that location and it is the user's responsibility to delete it. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed.
Constructor with user specified data
Definition at line 55 of file itkArray.txx.
| itk::Array< TValueType >::~Array | ( | ) |
This destructor is not virtual for performance reasons. However, this means that subclasses cannot allocate memory.
Destructor
Definition at line 67 of file itkArray.txx.
|
inline |
Set the all the elements of the array to the specified value
Definition at line 81 of file itkArray.h.
Referenced by itk::MutualInformationImageToImageMetric< TFixedImage, TMovingImage >::CalculateDerivatives(), otb::KMeansAttributesLabelMapFilter< TInputImage >::Compute(), itk::Statistics::WeightedCovarianceCalculator< TSample >::ComputeCovarianceWithGivenMean(), itk::Statistics::WeightedCovarianceCalculator< TSample >::ComputeCovarianceWithoutGivenMean(), itk::MRIBiasFieldCorrectionFilter< TInputImage, TOutputImage, TMaskImage >::EstimateBiasField(), itk::Statistics::FindSampleBoundAndMean(), itk::Statistics::WeightedCentroidKdTreeGenerator< TSample >::GenerateNonterminalNode(), itk::ImageSeriesReader< TOutputImage >::GenerateOutputInformation(), itk::NormalizedCorrelationImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative(), itk::MeanSquaresPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetDerivative(), itk::NormalizedCorrelationPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetDerivative(), itk::MeanReciprocalSquareDifferencePointSetToImageMetric< TFixedPointSet, TMovingImage >::GetDerivative(), otb::SVMCrossValidationCostFunction< TModel >::GetDerivative(), itk::MeanSquaresImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative(), itk::KappaStatisticImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative(), itk::MatchCardinalityImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative(), itk::HistogramImageToImageMetric< TFixedImage, TMovingImage >::GetDerivative(), itk::BSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >::GetJacobian(), itk::NormalizedCorrelationImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivative(), itk::MeanSquaresPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValueAndDerivative(), itk::NormalizedCorrelationPointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValueAndDerivative(), itk::MeanReciprocalSquareDifferencePointSetToImageMetric< TFixedPointSet, TMovingImage >::GetValueAndDerivative(), itk::MeanSquaresImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivative(), itk::MutualInformationImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivative(), itk::MattesMutualInformationImageToImageMetric< TFixedImage, TMovingImage >::GetValueAndDerivative(), otb::SVMModelEstimator< InputPixelType, LabelPixelType >::OptimizeParameters(), itk::ImageToImageMetric< TFixedImage, TMovingImage >::PreComputeTransformValues(), itk::MattesMutualInformationImageToImageMetric< TFixedImage, TMovingImage >::PreComputeTransformValues(), itk::Rigid3DPerspectiveTransform< TScalarType >::Rigid3DPerspectiveTransform(), and itk::MeasurementVectorTraits::SetLength().
|
inline |
Get one element
Definition at line 94 of file itkArray.h.
Referenced by itk::Statistics::RBFLayer< TMeasurementVector, TTargetVector >::ForwardPropagate(), otb::LocalRxDetectorNonThreadFilter< TInputImage, TOutputImage >::GenerateData(), otb::Statistics::GaussianModelComponent< TSample >::GenerateData(), and otb::LocalRxDetectorFilter< TInputImage, TOutputImage >::ThreadedGenerateData().
|
inline |
Definition at line 90 of file itkArray.h.
Referenced by itk::CumulativeGaussianCostFunction::CalculateFitError(), itk::CumulativeGaussianOptimizer::ExtendGaussian(), itk::CumulativeGaussianOptimizer::FindAverageSumOfSquaredDifferences(), itk::CumulativeGaussianOptimizer::FindParametersOfGaussian(), otb::LocalRxDetectorNonThreadFilter< TInputImage, TOutputImage >::GenerateData(), itk::CumulativeGaussianOptimizer::MeasureGaussianParameters(), itk::CumulativeGaussianOptimizer::PrintArray(), itk::CumulativeGaussianOptimizer::RecalculateExtendedArrayFromGaussianParameters(), itk::CumulativeGaussianCostFunction::SetOriginalDataArray(), itk::CumulativeGaussianOptimizer::StartOptimization(), otb::LocalRxDetectorFilter< TInputImage, TOutputImage >::ThreadedGenerateData(), and itk::CumulativeGaussianOptimizer::VerticalBestShift().
|
inline |
Definition at line 103 of file itkArray.h.
Referenced by itk::Statistics::ChiSquareDistribution::CDF(), itk::Statistics::TDistribution::CDF(), itk::Statistics::GaussianDistribution::CDF(), itk::SPSAOptimizer::ComputeGradient(), itk::Statistics::GaussianDistribution::EvaluateCDF(), itk::Statistics::TDistribution::EvaluateCDF(), itk::Statistics::ChiSquareDistribution::EvaluateCDF(), itk::Statistics::GaussianDistribution::EvaluateInverseCDF(), itk::Statistics::TDistribution::EvaluateInverseCDF(), itk::Statistics::ChiSquareDistribution::EvaluateInverseCDF(), itk::Statistics::GaussianDistribution::EvaluatePDF(), itk::Statistics::ChiSquareDistribution::EvaluatePDF(), itk::Statistics::TDistribution::EvaluatePDF(), itk::MeasurementVectorTraits::GetLength(), itk::SPSAOptimizer::GuessParameters(), itk::Statistics::ChiSquareDistribution::InverseCDF(), itk::Statistics::TDistribution::InverseCDF(), itk::Statistics::GaussianDistribution::InverseCDF(), itk::Array< TValueType >::operator=(), itk::Statistics::ChiSquareDistribution::PDF(), itk::Statistics::TDistribution::PDF(), itk::Statistics::GaussianDistribution::PDF(), itk::MetaArrayWriter::SetMultiChannelInput(), otb::MRFOptimizer::SetParameters(), and itk::Statistics::SampleToHistogramProjectionFilter< TInputSample, THistogramMeasurement >::SetProjectionAxis().
| const Array< TValueType >::Self & itk::Array< TValueType >::operator= | ( | const Self & | rhs | ) |
Copy opertor
Definition at line 150 of file itkArray.txx.
References itk::Array< TValueType >::GetSize().
| const Array< TValueType >::Self & itk::Array< TValueType >::operator= | ( | const VnlVectorType & | rhs | ) |
Definition at line 172 of file itkArray.txx.
| void itk::Array< TValueType >::SetData | ( | TValueType * | datain, |
| bool | LetArrayManageMemory = false |
||
| ) |
Set the pointer from which the data is imported. If "LetArrayManageMemory" is false, then the application retains the responsibility of freeing the memory for this data. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed.
Definition at line 84 of file itkArray.txx.
Referenced by itk::SingleValuedVnlCostFunctionAdaptor::compute(), itk::MultipleValuedVnlCostFunctionAdaptor::compute(), itk::SingleValuedVnlCostFunctionAdaptor::f(), itk::MultipleValuedVnlCostFunctionAdaptor::f(), itk::MetaArrayReader::GetOutput(), itk::SingleValuedVnlCostFunctionAdaptor::gradf(), and itk::MultipleValuedVnlCostFunctionAdaptor::gradf().
| void itk::Array< TValueType >::SetData | ( | TValueType * | datain, |
| unsigned int | sz, | ||
| bool | LetArrayManageMemory = false |
||
| ) |
Similar to the previous method. In the above method, the size must be seperately set prior to using user-supplied data. This introduces an unnecessary allocation step to be performed. This method avoids it and should be used to import data whereever possible to avoid this. Set the pointer from which the data is imported. If "LetArrayManageMemory" is false, then the application retains the responsibility of freeing the memory for this data. If "LetArrayManageMemory" is true, then this class will free the memory when this object is destroyed.
Definition at line 107 of file itkArray.txx.
|
inline |
Set one element
Definition at line 98 of file itkArray.h.
Referenced by itk::Statistics::RBFLayer< TMeasurementVector, TTargetVector >::BackwardPropagate(), itk::Statistics::RBFLayer< TMeasurementVector, TTargetVector >::ForwardPropagate(), and otb::Function::StandardRenderingFunction< TPixel, TRGBPixel, TPixelRepresentationFunction, TTransferFunction >::GetParameters().
| void itk::Array< TValueType >::SetSize | ( | unsigned int | sz | ) |
Destructively set the size to that given. Will lose data.
Definition at line 121 of file itkArray.txx.
Referenced by itk::Statistics::SquaredDifferenceErrorFunction< TMeasurementVector, ScalarType >::EvaluateDerivative(), itk::CumulativeGaussianOptimizer::FindParametersOfGaussian(), itk::Statistics::RBFLayer< TMeasurementVector, TTargetVector >::ForwardPropagate(), otb::SVMCrossValidationCostFunction< TModel >::GetDerivative(), itk::TranslationTransform< TScalarType, NDimensions >::GetFixedParameters(), itk::MetaArrayReader::GetMultiChannelOutput(), otb::Function::StandardRenderingFunction< TPixel, TRGBPixel, TPixelRepresentationFunction, TTransferFunction >::GetParameters(), itk::LevenbergMarquardtOptimizer::GetValue(), itk::CumulativeGaussianCostFunction::GetValue(), itk::MeanSquaresImageToImageMetric< TFixedImage, TMovingImage >::Initialize(), otb::LabelToProSailParameters< TLabel >::LabelToProSailParameters(), itk::ImageToImageMetric< TFixedImage, TMovingImage >::MultiThreadingInitialize(), itk::MeasurementVectorTraits::SetLength(), otb::Statistics::GaussianModelComponent< TSample >::SetParameters(), and itk::CumulativeGaussianOptimizer::StartOptimization().
|
inline |
Return the number of elements in the Array
Definition at line 88 of file itkArray.h.
Referenced by itk::MeasurementVectorTraits::Assert(), itk::MaximumDecisionRule::Evaluate(), itk::MinimumDecisionRule::Evaluate(), itk::Statistics::KdTreeBasedKmeansEstimator< TKdTree >::Filter(), otb::SVMCrossValidationCostFunction< TModel >::GetDerivative(), otb::SailModel::GetInput(), itk::Statistics::VariableDimensionHistogram< TMeasurement, TFrequencyContainer >::Initialize(), itk::AutomaticTopologyMeshSource< TOutputMesh >::IdentifierArrayHashFunction::operator()(), itk::AutomaticTopologyMeshSource< TOutputMesh >::IdentifierArrayEqualsFunction::operator()(), itk::VariableSizeMatrix< T >::operator*(), itk::Statistics::NeighborhoodSampler< TSample >::SetCenter(), otb::OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition >::SetFilter(), otb::ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition, TFilterPrecision >::SetFilter(), otb::ProspectModel::SetInput(), itk::MetaArrayWriter::SetInput(), otb::SailModel::SetInput(), itk::Statistics::MahalanobisDistanceMembershipFunction< TVector >::SetMean(), itk::Statistics::GaussianDensityFunction< TMeasurementVector >::SetMean(), itk::Statistics::DistanceMetric< TVector >::SetOrigin(), otb::MRFEnergy< TInput1, TInput2 >::SetParameters(), otb::MRFEnergy< TInput2, TInput2 >::SetParameters(), otb::Function::StandardRenderingFunction< TPixel, TRGBPixel, TPixelRepresentationFunction, TTransferFunction >::SetParameters(), and itk::LBFGSBOptimizer::StartOptimization().
|
private |
Definition at line 132 of file itkArray.h.