Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC
18 #define IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC
19 
20 #include "mitkBaseDataSource.h"
21 #include "mitkImage.h"
22 #include <MitkCoreExports.h>
23 
24 namespace mitk
25 {
41  {
42  public:
44 
45 
46  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
47 
50  typedef OutputImageType OutputType;
51  typedef OutputImageType::Pointer OutputImagePointer;
52  typedef SlicedData::RegionType OutputImageRegionType;
53 
105 
121  virtual itk::DataObject::Pointer
122  MakeOutput(DataObjectPointerArraySizeType idx) override;
123 
130  virtual itk::DataObject::Pointer MakeOutput(const DataObjectIdentifierType &name) override;
131 
132  virtual vtkImageData *GetVtkImageData();
133  virtual const vtkImageData *GetVtkImageData() const;
134 
135  protected:
136  ImageSource();
137  virtual ~ImageSource() {}
155  virtual void GenerateData() override;
156 
181  virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId);
182 
190  virtual void PrepareOutputs() override;
191 
199  virtual void AllocateOutputs();
200 
212  virtual void BeforeThreadedGenerateData() {}
225  virtual void AfterThreadedGenerateData() {}
233  virtual unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType &splitRegion);
234 
239  static ITK_THREAD_RETURN_TYPE ThreaderCallback(void *arg);
240 
243  {
245  };
246 
247  private:
248  ImageSource(const Self &); // purposely not implemented
249  void operator=(const Self &); // purposely not implemented
250  };
251 
252 } // namespace mitk
253 
254 #endif /* IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC */
Superclass of all classes generating Images (instances of class Image) as output. ...
#define MITKCORE_EXPORT
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
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:44
Image class for storing images.
Definition: mitkImage.h:76
virtual void AfterThreadedGenerateData()
If an imaging filter needs to perform processing after all processing threads have completed...
#define mitkBaseDataSourceGetOutputDeclarations