20 #ifndef MIRTK_LieBracketImageFilter_H 21 #define MIRTK_LieBracketImageFilter_H 23 #include "mirtk/ImageToImage.h" 25 #include "mirtk/ImageAttributes.h" 26 #include "mirtk/BaseImage.h" 27 #include "mirtk/GenericImage.h" 36 template <
class TVoxel>
43 using Baseclass::Input;
84 template <
class VoxelType>
92 template <
class VoxelType>
98 template <
class VoxelType>
101 if (i == 0) Baseclass::Input(image);
102 else if (i == 1)
_Input2 = image;
104 cerr << this->
NameOfClass() <<
"::Input: Input index out of range: " << i << endl;
110 template <
class VoxelType>
114 if (i == 0)
return Baseclass::Input();
115 else if (i == 1)
return _Input2;
117 cerr << this->
NameOfClass() <<
"::Input: Input index out of range: " << i << endl;
123 template <
class VoxelType>
131 template <
class VoxelType>
135 Baseclass::Initialize();
139 cerr << this->
NameOfClass() <<
"::Initialize: Filter has no second input" << endl;
143 cerr << this->
NameOfClass() <<
"::Initialize: Attributes of input images do not match" << endl;
151 #endif // MIRTK_LieBracketImageFilter_H 157 #ifndef MIRTK_LieBracketImageFilterNew_H 158 #define MIRTK_LieBracketImageFilterNew_H 160 #include "mirtk/Memory.h" 161 #include "mirtk/GenericImage.h" 162 #include "mirtk/LieBracketImageFilter2D.h" 163 #include "mirtk/LieBracketImageFilter3D.h" 164 #include "mirtk/DifferenceOfCompositionLieBracketImageFilter3D.h" 171 template <
class VoxelType>
181 cerr <<
NameOfType() <<
"::New: DifferenceOfCompositionLieBracketImageFilter2D not implemented" << endl;
188 template <
class VoxelType>
196 template <
class VoxelType>
202 UniquePtr<LieBracketFilter> filter(LieBracketFilter::New(lv, usejac));
203 filter->Input(0, lv);
204 filter->Input(1, rv);
212 #endif // MIRTK_LieBracketImageFilterNew_H virtual void Input(int, const ImageType *)
Set n-th input.
virtual ~LieBracketImageFilter()
Destructor.
static const char * NameOfType()
Get name of this class type.
const ImageAttributes & Attributes() const
Gets the image attributes.
virtual const ImageType * GetInput(int) const
bool HasSpatialAttributesOf(const BaseImage *) const
Checks if this image shares the same spatial attributes with another image.
int _z
Image z-dimension (in voxels)
GenericImage< VoxelType > ImageType
Input/output image type.
static LieBracketImageFilter * New(const ImageAttributes &, bool=true)
Construct Lie bracket filter for given image domain.
virtual void Initialize()
Initialize filter.
virtual const char * NameOfClass() const =0
Get name of class, which this object is an instance of.
int T() const
Returns the number of voxels in the t-direction.
const ImageType * _Input2
Second input vector field.
LieBracketImageFilter()
Constructor.