SIRF
3.4.0
sources
SIRF
src
Registration
cReg
include
sirf
Reg
NonRigidTransformation.h
Go to the documentation of this file.
1
/*
2
SyneRBI Synergistic Image Reconstruction Framework (SIRF)
3
Copyright 2020 University College London
4
5
This is software developed for the Collaborative Computational
6
Project in Synergistic Reconstruction for Biomedical Imaging (formerly CCP PETMR)
7
(http://www.ccpsynerbi.ac.uk/).
8
9
Licensed under the Apache License, Version 2.0 (the "License");
10
you may not use this file except in compliance with the License.
11
You may obtain a copy of the License at
12
http://www.apache.org/licenses/LICENSE-2.0
13
Unless required by applicable law or agreed to in writing, software
14
distributed under the License is distributed on an "AS IS" BASIS,
15
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
See the License for the specific language governing permissions and
17
limitations under the License.
18
19
*/
20
29
#pragma once
30
31
#include "
sirf/Reg/Transformation.h
"
32
33
namespace
sirf
{
34
template
<
class
dataType>
42
class
NonRigidTransformation
:
public
Transformation
<dataType>
43
{
44
public
:
45
47
virtual
~NonRigidTransformation
() {}
48
49
#ifndef _MSC_VER // need to disable on Visual Studio for https://github.com/SyneRBI/SIRF/issues/665
50
58
std::unique_ptr<NonRigidTransformation>
get_inverse
(
const
std::shared_ptr<
const
NiftiImageData<dataType>
> image_sptr =
nullptr
,
const
bool
use_vtk=
false
)
const
59
{
60
if
(!use_vtk)
61
return
std::unique_ptr<NonRigidTransformation>(this->
get_inverse_impl_nr
(image_sptr));
62
else
63
return
std::unique_ptr<NonRigidTransformation>(this->
get_inverse_impl_vtk
(image_sptr));
64
}
65
66
protected
:
68
virtual
NonRigidTransformation
*
get_inverse_impl_nr
(
const
std::shared_ptr<
const
NiftiImageData<dataType>
> image_sptr =
nullptr
)
const
= 0;
69
71
virtual
NonRigidTransformation
*
get_inverse_impl_vtk
(
const
std::shared_ptr<
const
NiftiImageData<dataType>
> image_sptr =
nullptr
)
const
= 0;
72
#endif // _MSC_VER
73
};
74
75
}
Transformation.h
Base class for transformations.
sirf::NonRigidTransformation::~NonRigidTransformation
virtual ~NonRigidTransformation()
Destructor.
Definition:
NonRigidTransformation.h:47
sirf::NonRigidTransformation
Base class for non-rigid transformations.
Definition:
NonRigidTransformation.h:42
sirf::Transformation
Forward declarations.
Definition:
Registration.h:39
sirf
Abstract data container.
Definition:
GeometricalInfo.cpp:141
sirf::NonRigidTransformation::get_inverse_impl_vtk
virtual NonRigidTransformation * get_inverse_impl_vtk(const std::shared_ptr< const NiftiImageData< dataType > > image_sptr=nullptr) const =0
Helper function for get_inverse (VTK). Don't use.
sirf::NonRigidTransformation::get_inverse
std::unique_ptr< NonRigidTransformation > get_inverse(const std::shared_ptr< const NiftiImageData< dataType > > image_sptr=nullptr, const bool use_vtk=false) const
Get inverse as unique pointer (potentially based on another image).
Definition:
NonRigidTransformation.h:58
sirf::NiftiImageData
Definition:
ImageWeightedMean.h:38
sirf::NonRigidTransformation::get_inverse_impl_nr
virtual NonRigidTransformation * get_inverse_impl_nr(const std::shared_ptr< const NiftiImageData< dataType > > image_sptr=nullptr) const =0
Helper function for get_inverse (NiftyReg). Don't use.
Generated by
1.8.13