Medical Imaging Interaction Toolkit  2018.4.99-064ad45c
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 
42  itkFactorylessNewMacro(Self);
43  itkCloneMacro(Self);
44 
47  typedef OutputImageType OutputType;
50 
102 
118  itk::DataObject::Pointer
119  MakeOutput(DataObjectPointerArraySizeType idx) override;
120 
127  itk::DataObject::Pointer MakeOutput(const DataObjectIdentifierType &name) override;
128 
129  virtual vtkImageData *GetVtkImageData();
130  virtual const vtkImageData *GetVtkImageData() const;
131 
132  protected:
133  ImageSource();
134  ~ImageSource() override {}
152  void GenerateData() override;
153 
178  virtual void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId);
179 
187  void PrepareOutputs() override;
188 
196  virtual void AllocateOutputs();
197 
209  virtual void BeforeThreadedGenerateData() {}
222  virtual void AfterThreadedGenerateData() {}
230  virtual unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType &splitRegion);
231 
236  static ITK_THREAD_RETURN_TYPE ThreaderCallback(void *arg);
237 
240  {
242  };
243 
244  private:
245  ImageSource(const Self &); // purposely not implemented
246  void operator=(const Self &); // purposely not implemented
247  };
248 
249 } // namespace mitk
250 
251 #endif /* IMAGESOURCE_H_HEADER_INCLUDED_C1E7D6EC */
Superclass of all classes generating Images (instances of class Image) as output. ...
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
~ImageSource() override
#define MITKCORE_EXPORT
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.
OutputImageType OutputType
itk::ImageRegion< RegionDimension > RegionType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
mitk::Image OutputImageType
Some convenient typedefs.
virtual void AfterThreadedGenerateData()
If an imaging filter needs to perform processing after all processing threads have completed...
OutputImageType::Pointer OutputImagePointer
#define mitkBaseDataSourceGetOutputDeclarations