38 #ifndef ITK_STANDARDIMAGE_REPRESENTER_H_
39 #define ITK_STANDARDIMAGE_REPRESENTER_H_
41 #include "statismoITKConfig.h"
45 #include <itkObject.h>
48 #include "itkPixelConversionTraits.h"
49 #include "itkStandardImageRepresenterTraits.h"
51 #include "CommonTypes.h"
52 #include "Representer.h"
62 template<
class TPixel,
unsigned ImageDimension>
64 itk::Image<TPixel, ImageDimension> > {
69 typedef Object Superclass;
70 typedef SmartPointer<Self> Pointer;
71 typedef SmartPointer<const Self> ConstPointer;
79 typedef itk::Image<TPixel, ImageDimension> ImageType;
81 typedef typename statismo::Representer<ImageType> RepresenterBaseType;
83 typedef typename RepresenterBaseType::PointType PointType;
84 typedef typename RepresenterBaseType::ValueType ValueType;
85 typedef typename RepresenterBaseType::DatasetType DatasetType;
86 typedef typename RepresenterBaseType::DatasetPointerType DatasetPointerType;
87 typedef typename RepresenterBaseType::DatasetConstPointerType DatasetConstPointerType;
92 void Load(
const H5::Group& fg);
98 unsigned GetDimensions()
const {
99 return PixelConversionTrait<TPixel>::GetPixelDimension();
101 std::string GetName()
const {
102 return "itkStandardImageRepresenter";
104 typename RepresenterBaseType::RepresenterDataType GetType()
const {
105 return RepresenterBaseType::IMAGE;
111 std::string GetVersion()
const {
128 statismo::VectorType
PointToVector(
const PointType& pt)
const;
129 DatasetPointerType DatasetToSample(DatasetConstPointerType ds)
const;
130 statismo::VectorType SampleToSampleVector(DatasetConstPointerType sample)
const;
131 DatasetPointerType SampleVectorToSample(
132 const statismo::VectorType& sample)
const;
134 ValueType PointSampleFromSample(DatasetConstPointerType sample,
135 unsigned ptid)
const;
136 ValueType PointSampleVectorToPointSample(
137 const statismo::VectorType& pointSample)
const;
138 statismo::VectorType PointSampleToPointSampleVector(
139 const ValueType& v)
const;
141 void Save(
const H5::Group& fg)
const;
142 virtual unsigned GetPointIdForPoint(
const PointType& point)
const;
144 unsigned GetNumberOfPoints()
const;
146 void Delete()
const {
151 void DeleteDataset(DatasetConstPointerType d)
const {}
152 DatasetPointerType CloneDataset(DatasetConstPointerType d)
const;
156 typename ImageType::Pointer LoadRef(
const H5::Group& fg)
const;
157 typename ImageType::Pointer LoadRefLegacy(
const H5::Group& fg)
const;
159 DatasetConstPointerType m_reference;
165 #include "itkStandardImageRepresenter.hxx"
A representer for scalar and vector valued images.
Definition: itkStandardImageRepresenter.h:63
statismo::VectorType PointToVector(const PointType &pt) const
Definition: itkStandardImageRepresenter.hxx:221
itkTypeMacro(StandardImageRepresenter, Object)
void SetReference(ImageType *ds)
Definition: itkStandardImageRepresenter.hxx:202
DatasetConstPointerType GetReference() const
return the reference used in the representer
Definition: itkStandardImageRepresenter.h:116