ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSinusoidImageSource.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkSinusoidImageSource_h
19#define itkSinusoidImageSource_h
20
22#include "itkFixedArray.h"
23
24namespace itk
25{
26
40template <typename TOutputImage>
41class SinusoidImageSource : public ParametricImageSource<TOutputImage>
42{
43public:
44 ITK_DISALLOW_COPY_AND_MOVE(SinusoidImageSource);
45
51
53 using OutputImageType = TOutputImage;
54
56 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
57
60
62 using SizeType = typename TOutputImage::SizeType;
63 using SizeValueType = typename TOutputImage::SizeValueType;
64
68
70 itkOverrideGetNameOfClassMacro(SinusoidImageSource);
71
73 itkNewMacro(Self);
74
76 itkSetMacro(PhaseOffset, double);
77 itkGetConstMacro(PhaseOffset, double);
80 itkGetConstReferenceMacro(Frequency, ArrayType);
81
86 void
87 SetParameters(const ParametersType & parameters) override;
89 GetParameters() const override;
90
94 unsigned int
95 GetNumberOfParameters() const override;
96
97protected:
99 // ~SinusoidImageSource(); default implementation ok
100 void
101 PrintSelf(std::ostream & os, Indent indent) const override;
102
103 void
104 GenerateData() override;
105
106private:
108
111
113 double m_PhaseOffset{ 0.0 };
114
118};
119
120} // end namespace itk
121
122#ifndef ITK_MANUAL_INSTANTIATION
123# include "itkSinusoidImageSource.hxx"
124#endif
125
126#endif
Simulate a standard C array with copy semantics.
Control indentation during Print() invocation.
Definition itkIndent.h:53
Array< ParametersValueType > ParametersType
SmartPointer< const Self > ConstPointer
typename TOutputImage::SizeValueType SizeValueType
FixedArray< double, ImageDimension > ArrayType
unsigned int GetNumberOfParameters() const override
typename Superclass::ParametersValueType ParametersValueType
void GenerateData() override
void PrintSelf(std::ostream &os, Indent indent) const override
static constexpr unsigned int ImageDimension
ParametersType GetParameters() const override
void SetParameters(const ParametersType &parameters) override
typename TOutputImage::SizeType SizeType
ParametricImageSource< TOutputImage > Superclass
typename Superclass::ParametersType ParametersType
Implements transparent reference counting.
#define itkConceptMacro(name, conceptType)
Compile-time check that a template argument satisfies an itk::Concept.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)