ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBlockMatchingMultiResolutionIterationObserver.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 itkBlockMatchingMultiResolutionIterationObserver_h
19#define itkBlockMatchingMultiResolutionIterationObserver_h
20
22
24#include "itkSplitComponentsImageFilter.h"
25
26#include "itkImageFileWriter.h"
27
28#include <fstream>
29#include <string>
30
31namespace itk
32{
33namespace BlockMatching
34{
35
42template <typename TMultiResolutionMethod>
44{
45public:
46 ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionIterationObserver);
47
51
52 itkNewMacro(Self);
53
55 void
56 Execute(itk::Object * caller, const itk::EventObject & event) override;
57 //{
58 // Execute( (const itk::Object *)caller, event);
59 //}
60
61 // void Execute(const itk::Object * object, const itk::EventObject & event) override;
62
63 using MultiResolutionMethodType = TMultiResolutionMethod;
64 using FixedImageType = typename MultiResolutionMethodType::FixedImageType;
65 using MovingImageType = typename MultiResolutionMethodType::MovingImageType;
66 using DisplacementImageType = typename MultiResolutionMethodType::DisplacementImageType;
67
68 itkSetStringMacro(OutputFilePrefix);
69 itkGetConstMacro(OutputFilePrefix, std::string);
70
71protected:
74
75 // search region radius
76 std::string m_OutputFilePrefix;
77
78 std::ofstream m_CSVFile;
79
82
85
88
89 using MetricImageType = typename MultiResolutionMethodType::MetricImageType;
90 using MetricPixelType = typename MetricImageType::PixelType;
95 typename DisplacementComponentsWriterType::Pointer m_DisplacementComponentsWriter;
96
100
103
108
109private:
110};
111
112} // end namespace BlockMatching
113} // end namespace itk
114
115#include "itkBlockMatchingMultiResolutionIterationObserver.hxx"
116
117#endif
void Execute(itk::Object *caller, const itk::EventObject &event) override
itk::StrainImageFilter< DisplacementImageType, MetricPixelType, MetricPixelType > StrainFilterType
void Execute(itk::Object *caller, const itk::EventObject &event) override
itk::SplitComponentsImageFilter< DisplacementImageType, MetricImageType, MetricImageType::ImageDimension > DisplacementComponentsFilterType
MultiResolutionIterationCommand< TMultiResolutionMethod > Superclass
typename MultiResolutionMethodType::DisplacementImageType DisplacementImageType
itk::SplitComponentsImageFilter< StrainImageType, MetricImageType, 3 > StrainComponentsFilterType
Abstraction of the Events used to communicating among filters and with GUIs.
Writes image data to a single file.
Base class for most ITK classes.
Definition itkObject.h:62
Implements transparent reference counting.
Extract components of an Image with multi-component pixels.
Generate a strain field image from a displacement field image.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....