Medical Imaging Interaction Toolkit  2024.06.00
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 mitkImageSource_h
14 #define mitkImageSource_h
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 
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::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
mitk::ImageSource
Superclass of all classes generating Images (instances of class Image) as output.
Definition: mitkImageSource.h:36
mitkImage.h
mitk::ImageSource::AfterThreadedGenerateData
virtual void AfterThreadedGenerateData()
If an imaging filter needs to perform processing after all processing threads have completed,...
Definition: mitkImageSource.h:222
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
mitk::SlicedData::RegionType
itk::ImageRegion< RegionDimension > RegionType
Definition: mitkSlicedData.h:45
mitk::ImageSource::BeforeThreadedGenerateData
virtual void BeforeThreadedGenerateData()
If an imaging filter needs to perform processing after the buffer has been allocated but before threa...
Definition: mitkImageSource.h:209
mitk::ImageSource::OutputImagePointer
OutputImageType::Pointer OutputImagePointer
Definition: mitkImageSource.h:48
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::BaseDataSource::DataObjectIdentifierType
itk::DataObject::DataObjectIdentifierType DataObjectIdentifierType
Definition: mitkBaseDataSource.h:77
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
MitkCoreExports.h
mitk::ImageSource::OutputImageType
mitk::Image OutputImageType
Some convenient typedefs.
Definition: mitkImageSource.h:43
mitk::ImageSource::ThreadStruct
Internal structure used for passing image data into the threading library.
Definition: mitkImageSource.h:239
mitkBaseDataSourceGetOutputDeclarations
#define mitkBaseDataSourceGetOutputDeclarations
Definition: mitkBaseDataSource.h:20
mitkBaseDataSource.h
mitk::ImageSource::ThreadStruct::Filter
Pointer Filter
Definition: mitkImageSource.h:241
mitk::ImageSource::OutputImageRegionType
SlicedData::RegionType OutputImageRegionType
Definition: mitkImageSource.h:49
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::ImageSource::~ImageSource
~ImageSource() override
Definition: mitkImageSource.h:134
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::ImageSource::OutputType
OutputImageType OutputType
Definition: mitkImageSource.h:47