ANIMA  4.0
animaMaskedImageToImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
5 #include <itkNumericTraits.h>
6 
7 namespace anima
8 {
9 
10 template <typename TInputImage, typename TOutputImage>
12  public anima::NumberedThreadImageToImageFilter <TInputImage, TOutputImage>
13 {
14 public:
18  typedef itk::SmartPointer<Self> Pointer;
19  typedef itk::SmartPointer<const Self> ConstPointer;
20 
22  itkNewMacro(Self)
23 
24 
26 
27 
28  typedef typename Superclass::InputImageRegionType InputImageRegionType;
29  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
30  typedef typename itk::ImageSource<TOutputImage>::ThreadStruct ThreadStruct;
31 
33  typedef itk::Image <unsigned char,TInputImage::ImageDimension> MaskImageType;
34  typedef typename MaskImageType::RegionType MaskRegionType;
35  typedef typename MaskImageType::Pointer MaskImagePointer;
36  typedef typename MaskImageType::IndexType MaskIndexType;
37  typedef typename MaskImageType::SizeType MaskSizeType;
38 
40  itkSetMacro(ComputationMask, MaskImagePointer)
41  itkGetMacro(ComputationMask, MaskImageType *)
42 
43 protected:
45  {
46  m_ComputationMask = ITK_NULLPTR;
47  }
48 
50 
51  virtual void CheckComputationMask();
53  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
54 
55 private:
56  ITK_DISALLOW_COPY_AND_ASSIGN(MaskedImageToImageFilter);
57 
58  MaskImagePointer m_ComputationMask;
59 };
60 
61 } //end namespace anima
62 
Implements a class to handle thread number in a dynamic way for multithreaded methods needing thread ...
itk::Image< unsigned char, itk::VectorImage< PixelScalarType, 3 > ::ImageDimension > MaskImageType
itk::SmartPointer< const Self > ConstPointer
anima::NumberedThreadImageToImageFilter< TInputImage, TOutputImage > Superclass
virtual void BeforeThreadedGenerateData() ITK_OVERRIDE