ANIMA  4.0
animaMCMBlockMatchInitializer.h
Go to the documentation of this file.
1 #pragma once
3 
4 #include <animaMCMImage.h>
6 
7 namespace anima
8 {
9 
10 template <class PixelType, unsigned int NDimensions=3>
12  : public anima::BlockMatchingInitializer <PixelType, NDimensions>
13 {
14 public:
17  typedef itk::SmartPointer<Self> Pointer;
18  typedef itk::SmartPointer<const Self> ConstPointer;
19 
21 
23  itkNewMacro(Self)
24 
25 
27 
29  typedef typename MCModelType::Pointer MCModelPointer;
30 
32  typedef typename Superclass::ImageRegionType ImageRegionType;
33 
34  struct MCMBlockGeneratorThreadStruct : public BlockGeneratorThreadStruct
35  {
36  std::vector < std::vector <MCModelPointer> > ref_models;
37  };
38 
39  void AddReferenceImage(itk::ImageBase <NDimensions> *refImage) ITK_OVERRIDE;
40 
41 protected:
42  MCMBlockMatchingInitializer() : Superclass()
43  {
44  }
45 
47 
48  void InitializeThreading(unsigned int maskIndex, BlockGeneratorThreadStruct *&workStr) ITK_OVERRIDE;
49  bool CheckOrientedModelVariance(unsigned int imageIndex, ImageRegionType &region, double &blockVariance,
50  BlockGeneratorThreadStruct *workStr, unsigned int threadId) ITK_OVERRIDE;
51 
52 private:
53  MCMBlockMatchingInitializer(const Self&); //purposely not implemented
54  void operator=(const Self&); //purposely not implemented
55 
56  std::vector <MCModelPointer> m_ReferenceModels;
57 };
58 
59 } // end of namespace anima
60 
void InitializeThreading(unsigned int maskIndex, BlockGeneratorThreadStruct *&workStr) ITK_OVERRIDE
void AddReferenceImage(itk::ImageBase< NDimensions > *refImage) ITK_OVERRIDE
anima::MCMImage< PixelType, NDimensions > MCMImageType
MCMBlockMatchingInitializer< PixelType, NDimensions > Self
itk::SmartPointer< const Self > ConstPointer
MultiCompartmentModel: holds several diffusion compartments, ordered by type It also handles weights ...
ScalarImageType::RegionType ImageRegionType
anima::BlockMatchingInitializer< PixelType, NDimensions > Superclass
bool CheckOrientedModelVariance(unsigned int imageIndex, ImageRegionType &region, double &blockVariance, BlockGeneratorThreadStruct *workStr, unsigned int threadId) ITK_OVERRIDE