Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
mitkImageSource.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC
14 #define IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC
15 
16 #include "mitkBaseDataSource.h"
17 #include "mitkImage.h"
18 #include <MitkCoreExports.h>
19 
20 namespace mitk
21 {
37  {
38  public:
40 
41 
42  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
43 
44 
46  typedef OutputImageType OutputType;
47  typedef OutputImageType::Pointer OutputImagePointer;
48  typedef SlicedData::RegionType OutputImageRegionType;
49 
101 
117  itk::DataObject::Pointer
118  MakeOutput(DataObjectPointerArraySizeType idx) override;
119 
126  itk::DataObject::Pointer MakeOutput(const DataObjectIdentifierType &name) override;
127 
128  virtual vtkImageData *GetVtkImageData();
129  virtual const vtkImageData *GetVtkImageData() const;
130 
131  protected:
132  ImageSource();
133  ~ImageSource() override {}
151  void GenerateData() override;
152 
177  virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId);
178 
186  void PrepareOutputs() override;
187 
195  virtual void AllocateOutputs();
196 
208  virtual void BeforeThreadedGenerateData() {}
221  virtual void AfterThreadedGenerateData() {}
229  virtual unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType &splitRegion);
230 
235  static ITK_THREAD_RETURN_TYPE ThreaderCallback(void *arg);
236 
239  {
241  };
242 
243  private:
244  ImageSource(const Self &); // purposely not implemented
245  void operator=(const Self &); // purposely not implemented
246  };
247 
248 } // namespace mitk
249 
250 #endif /* IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC */
Superclass of all classes generating Images (instances of class Image) as output. ...
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
#define MITKCORE_EXPORT
Base of all data objects.
Definition: mitkBaseData.h:37
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
SlicedData::RegionType OutputImageRegionType
virtual void BeforeThreadedGenerateData()
If an imaging filter needs to perform processing after the buffer has been allocated but before threa...
Internal structure used for passing image data into the threading library.
Super class of data objects consisting of slices.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
virtual void AfterThreadedGenerateData()
If an imaging filter needs to perform processing after all processing threads have completed...
#define mitkBaseDataSourceGetOutputDeclarations