SIRF  3.5.0
NiftyRegistration.h
Go to the documentation of this file.
1 /*
2 SyneRBI Synergistic Image Reconstruction Framework (SIRF)
3 Copyright 2017 - 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 
30 #pragma once
31 
33 
34 namespace sirf {
35 
37 template<class dataType> class NiftiImageData3D;
38 
46 template<class dataType>
47 class NiftyRegistration : public NiftiBasedRegistration<dataType>
48 {
49 public:
50 
53 
55  virtual ~NiftyRegistration() {}
56 
58  void set_parameter_file(const std::string &parameter_filename) { _parameter_filename = parameter_filename; }
59 
64  void set_parameter(const std::string &par, const std::string &arg1 = "", const std::string &arg2 = "");
65 
67  void set_reference_mask(const std::shared_ptr<const ImageData> reference_mask_sptr) { _reference_mask_sptr = reference_mask_sptr; }
68 
70  void set_floating_mask(const std::shared_ptr<const ImageData> floating_mask_sptr) { _floating_mask_sptr = floating_mask_sptr; }
71 
72 protected:
73 
75  virtual void parse_parameter_file() = 0;
76 
78  void set_up_inputs();
79 
81  virtual void set_parameters() = 0;
82 
84  std::vector<std::string> _extra_params;
85 
87  std::string _parameter_filename;
88 
90  std::shared_ptr<const ImageData> _floating_mask_sptr;
92  std::shared_ptr<const ImageData> _reference_mask_sptr;
93 
95  std::shared_ptr<const NiftiImageData3D<dataType> > _floating_mask_nifti_sptr;
97  std::shared_ptr<const NiftiImageData3D<dataType> > _reference_mask_nifti_sptr;
98 };
99 }
Base class for all NIfTI-based registrations.
Base class for all NIfTI-based registrations.
Definition: NiftiBasedRegistration.h:48
Base class for all NiftyReg registrations.
Definition: NiftyRegistration.h:48
std::vector< std::string > _extra_params
Store extra parameters. Only apply them after parsing.
Definition: NiftyRegistration.h:84
void set_reference_mask(const std::shared_ptr< const ImageData > reference_mask_sptr)
Set reference mask.
Definition: NiftyRegistration.h:67
NiftyRegistration()
Constructor.
Definition: NiftyRegistration.cpp:36
void set_up_inputs()
Set up inputs.
Definition: NiftyRegistration.cpp:52
virtual void parse_parameter_file()=0
Parse parameter file.
std::shared_ptr< const NiftiImageData3D< dataType > > _floating_mask_nifti_sptr
Floating mask (as NiftiImageData3D)
Definition: NiftyRegistration.h:95
std::shared_ptr< const NiftiImageData3D< dataType > > _reference_mask_nifti_sptr
Reference mask (as NiftiImageData3D)
Definition: NiftyRegistration.h:97
virtual ~NiftyRegistration()
Destructor.
Definition: NiftyRegistration.h:55
void set_parameter(const std::string &par, const std::string &arg1="", const std::string &arg2="")
Definition: NiftyRegistration.cpp:44
std::shared_ptr< const ImageData > _reference_mask_sptr
Reference mask.
Definition: NiftyRegistration.h:92
void set_floating_mask(const std::shared_ptr< const ImageData > floating_mask_sptr)
Set floating mask.
Definition: NiftyRegistration.h:70
std::shared_ptr< const ImageData > _floating_mask_sptr
Floating mask.
Definition: NiftyRegistration.h:90
void set_parameter_file(const std::string &parameter_filename)
Set parameter file.
Definition: NiftyRegistration.h:58
std::string _parameter_filename
Parameter filename.
Definition: NiftyRegistration.h:87
virtual void set_parameters()=0
Set any extra parameters.
Abstract data container.
Definition: GeometricalInfo.cpp:141