Loading...
Searching...
No Matches
itkListSampleCArray.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkListSampleCArray_h
#define itkListSampleCArray_h
#include "itkObjectFactory.h"
//#include "itkListSampleBase.h"
#include "itkSample.h"
namespace itk
{
namespace Statistics
{
template <class TMeasurementVector, class TInternalValue = typename TMeasurementVector::ValueType>
class ITK_TEMPLATE_EXPORT ListSampleCArray : public Sample<TMeasurementVector>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(ListSampleCArray);
using Self = ListSampleCArray;
using Superclass = Sample<TMeasurementVector>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(ListSampleCArray, Sample);
using typename Superclass::MeasurementVectorType;
using typename Superclass::MeasurementVectorSizeType;
using typename Superclass::MeasurementType;
using typename Superclass::AbsoluteFrequencyType;
using typename Superclass::TotalAbsoluteFrequencyType;
using typename Superclass::InstanceIdentifier;
using InternalValueType = TInternalValue;
using InternalDataType = InternalValueType *;
using InternalDataContainerType = InternalDataType *;
itkGetConstMacro(InternalContainer, InternalDataContainerType);
void
Resize(unsigned long n);
void
SetActualSize(unsigned long n);
unsigned long
GetActualSize();
void
Clear();
InstanceIdentifier
Size() const override
{
return this->m_InternalContainerSize;
}
const MeasurementVectorType &
GetMeasurementVector(InstanceIdentifier id) const override;
void
GetMeasurementVector(InstanceIdentifier id, MeasurementVectorType & mv) const;
void
SetMeasurement(InstanceIdentifier id, unsigned int dim, const MeasurementType & value);
void
SetMeasurementVector(InstanceIdentifier id, const MeasurementVectorType & mv);
AbsoluteFrequencyType
GetFrequency(InstanceIdentifier id) const override;
TotalAbsoluteFrequencyType
GetTotalFrequency() const override
{
return static_cast<TotalAbsoluteFrequencyType>(this->m_InternalContainerSize);
}
protected:
ListSampleCArray();
~ListSampleCArray() override;
void
PrintSelf(std::ostream & os, Indent indent) const override;
private:
InternalDataContainerType m_InternalContainer{};
InstanceIdentifier m_InternalContainerSize{};
InstanceIdentifier m_ActualSize{};
mutable MeasurementVectorType m_TemporaryMeasurementVector{};
void
AllocateInternalContainer(unsigned long size, unsigned int dim);
void
DeallocateInternalContainer();
};
} // end namespace Statistics
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkListSampleCArray.hxx"
#endif
#endif // end #ifndef itkListSampleCArray_h
itk::Statistics::ListSampleCArray::m_ActualSize
InstanceIdentifier m_ActualSize
Definition itkListSampleCArray.h:145
itk::Statistics::ListSampleCArray::AllocateInternalContainer
void AllocateInternalContainer(unsigned long size, unsigned int dim)
itk::Statistics::ListSampleCArray::SetMeasurementVector
void SetMeasurementVector(InstanceIdentifier id, const MeasurementVectorType &mv)
itk::Statistics::ListSampleCArray::GetMeasurementVector
const MeasurementVectorType & GetMeasurementVector(InstanceIdentifier id) const override
itk::Statistics::ListSampleCArray::Resize
void Resize(unsigned long n)
itk::Statistics::ListSampleCArray::Superclass
Sample< TMeasurementVector > Superclass
Definition itkListSampleCArray.h:52
itk::Statistics::ListSampleCArray::InternalDataType
InternalValueType * InternalDataType
Definition itkListSampleCArray.h:72
itk::Statistics::ListSampleCArray::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::Statistics::ListSampleCArray::InternalValueType
TInternalValue InternalValueType
Definition itkListSampleCArray.h:71
itk::Statistics::ListSampleCArray::GetFrequency
AbsoluteFrequencyType GetFrequency(InstanceIdentifier id) const override
itk::Statistics::ListSampleCArray::m_InternalContainerSize
InstanceIdentifier m_InternalContainerSize
Definition itkListSampleCArray.h:144
itk::Statistics::ListSampleCArray::SetMeasurement
void SetMeasurement(InstanceIdentifier id, unsigned int dim, const MeasurementType &value)
itk::Statistics::ListSampleCArray::InternalDataContainerType
InternalDataType * InternalDataContainerType
Definition itkListSampleCArray.h:73
itk::Statistics::ListSampleCArray::m_TemporaryMeasurementVector
MeasurementVectorType m_TemporaryMeasurementVector
Definition itkListSampleCArray.h:148
itk::Statistics::ListSampleCArray::Clear
void Clear()
itk::Statistics::ListSampleCArray::DeallocateInternalContainer
void DeallocateInternalContainer()
itk::Statistics::ListSampleCArray::GetTotalFrequency
TotalAbsoluteFrequencyType GetTotalFrequency() const override
Definition itkListSampleCArray.h:129
itk::Statistics::ListSampleCArray::ListSampleCArray
ListSampleCArray()
itk::Statistics::ListSampleCArray::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkListSampleCArray.h:54
itk::Statistics::ListSampleCArray::SetActualSize
void SetActualSize(unsigned long n)
itk::Statistics::ListSampleCArray::Self
ListSampleCArray Self
Definition itkListSampleCArray.h:51
itk::Statistics::ListSampleCArray::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(ListSampleCArray)
itk::Statistics::ListSampleCArray::~ListSampleCArray
~ListSampleCArray() override
itk::Statistics::ListSampleCArray::Pointer
SmartPointer< Self > Pointer
Definition itkListSampleCArray.h:53
itk::Statistics::ListSampleCArray::GetActualSize
unsigned long GetActualSize()
itk::Statistics::ListSampleCArray::Size
InstanceIdentifier Size() const override
Definition itkListSampleCArray.h:96
itk::Statistics::ListSampleCArray::m_InternalContainer
InternalDataContainerType m_InternalContainer
Definition itkListSampleCArray.h:143
itk::Statistics::ListSampleCArray::GetMeasurementVector
void GetMeasurementVector(InstanceIdentifier id, MeasurementVectorType &mv) const
itk::Statistics
Definition itkListSampleCArray.h:28
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |