This file is indexed.

/usr/include/mia-2.4/mia/3d/timestep.hh is in libmia-2.4-dev 2.4.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/* -*- mia-c++  -*-
 *
 * This file is part of MIA - a toolbox for medical image analysis 
 * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
 *
 * MIA is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MIA; if not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef mia_3d_timestep_hh
#define mia_3d_timestep_hh

#include <mia/core/factory.hh>
#include <mia/core/typedescr.hh>
#include <mia/3d/image.hh>

NS_MIA_BEGIN

/**
   \ingroup registration 
   \brief The time-step part of time-marching registration algorithms. 

   

*/

class EXPORT_3D C3DRegTimeStep :public CProductBase {
public:
	/// plugin hanlder helper  
	typedef C3DImage plugin_data; 
	/// plugin hanlder helper 
	typedef timestep_type plugin_type; 

	/**
	   Contructor to initialize the time setep with the range of possible 
	   time step length 
	   \param min
	   \param max
	 */
	C3DRegTimeStep(float min, float max);

	virtual ~C3DRegTimeStep();

	/**
	   Apply the time step based on an input vector field to an output transformation 
	   \param infield input vector field to add
	   \param[in,out] outfield at input: vector field that is to be changed, at output: updated field 
	   \param scale a scaling to apply to the input field prior to applying it 
	 */
	void apply(const C3DFVectorfield& infield, C3DFVectorfield& outfield, float scale);

	/**
	   Evaluate the pertuberation related to the time step type and transformation 
	   \param[in,out] io at input: the field to pertoperate, output: pertuperated field 
	   \param shift related current transformation to base the pertuberation on 
	 */
	float calculate_pertuberation(C3DFVectorfield& io, const C3DFVectorfield& shift) const;

	/**
	   Decrease the current time step 
	   \returns true if decreasing time-step was sucessfull, otherwise false 
	   
	 */
	bool decrease();

	/**
	   Increase time step (at most to its maximum)
	 */
	void increase();

	/**
	   Evaluate the delta for the application of the time step based on the maxium allowed 
	   transformation 
	   \param maxshift maximum hypothetical transfornmation to be applied 
	   \returns the delta value corresponding to the current time step 
	 */
	float get_delta(float maxshift) const;

	/**
	   For a fluid-dynamic like registration evaluate whether a regridding is needed. 
	   For other time-steps it always should return false 
	   \param b current force field
	   \param v velocity field 
	   \param delta time step value to be applied 
	   \returns true if regridding is to be applied 
	 */
	bool regrid_requested (const C3DFVectorfield& b, const C3DFVectorfield& v, float delta) const;

	/**
	   \returns true if the time-step requires regridding 
	 */
	bool has_regrid () const;

private:
	virtual float do_calculate_pertuberation(C3DFVectorfield& io, const C3DFVectorfield& shift) const = 0;
	virtual bool do_regrid_requested (const C3DFVectorfield& b, const C3DFVectorfield& v, float delta) const = 0;
	virtual bool do_has_regrid () const = 0;


	float m_min;
	float m_max;
	float m_current;
	float m_step;
};


/**
   \brief The plug-in class for the time-step class of time-marching registration algorithms. 

 

*/
class EXPORT_3D C3DRegTimeStepPlugin : public TFactory<C3DRegTimeStep>
{
public:
	/// Constructor to create the plug-in with its name 
	C3DRegTimeStepPlugin(const char *name);
protected:
	/// \returns the minimal allowed time step 
	float get_min_timestep() const;
	/// \returns the maximum allowed time step 
	float get_max_timestep() const;
private: 
	float m_min;
	float m_max;
};

/// Pointer type for time steps in 3D time-marching image registration \sa C3DRegTimeStep
typedef std::shared_ptr<C3DRegTimeStep > P3DRegTimeStep;

/// plugin handler for 3D time marching time step operator plug-ins 
typedef THandlerSingleton<TFactoryPluginHandler<C3DRegTimeStepPlugin> > C3DRegTimeStepPluginHandler;

NS_MIA_END

#endif