Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkRGBToRGBACastImageFilter.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 mitkRGBToRGBACastImageFilter_h
14 #define mitkRGBToRGBACastImageFilter_h
15 
16 #include "mitkImageTimeSelector.h"
17 #include "mitkImageToImageFilter.h"
18 #include <MitkCoreExports.h>
19 
20 #include <itkRGBPixel.h>
21 
22 namespace itk
23 {
24  template <class TPixel, unsigned int VImageDimension>
25  class ITK_EXPORT Image;
26 }
27 
28 namespace mitk
29 {
30  //##Documentation
31  //## @brief
32  //## @ingroup Process
34  {
35  public:
37 
38  itkFactorylessNewMacro(Self);
39 
40  itkCloneMacro(Self);
41 
47  static bool IsRGBImage(const mitk::Image *image);
48 
49  protected:
50  // Typedefs for supported RGB pixel types
51  typedef itk::RGBPixel<unsigned char> UCRGBPixelType;
52  typedef itk::RGBPixel<unsigned short> USRGBPixelType;
53  typedef itk::RGBPixel<float> FloatRGBPixelType;
54  typedef itk::RGBPixel<double> DoubleRGBPixelType;
55 
57 
58  ~RGBToRGBACastImageFilter() override;
59 
60  void GenerateInputRequestedRegion() override;
61 
62  void GenerateOutputInformation() override;
63 
64  void GenerateData() override;
65 
66  template <typename TPixel, unsigned int VImageDimension>
67  void InternalCast(itk::Image<TPixel, VImageDimension> *itkImage,
68  mitk::RGBToRGBACastImageFilter *addComponentFilter,
69  typename TPixel::ComponentType defaultAlpha);
70 
73 
74  //##Description
75  //## @brief Time when Header was last initialized
77  };
78 
79 } // namespace mitk
80 
81 #endif
mitkImageToImageFilter.h
mitk::RGBToRGBACastImageFilter::USRGBPixelType
itk::RGBPixel< unsigned short > USRGBPixelType
Definition: mitkRGBToRGBACastImageFilter.h:52
mitk::RGBToRGBACastImageFilter::UCRGBPixelType
itk::RGBPixel< unsigned char > UCRGBPixelType
Definition: mitkRGBToRGBACastImageFilter.h:51
mitkImageTimeSelector.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
mitk::RGBToRGBACastImageFilter::m_InputTimeSelector
mitk::ImageTimeSelector::Pointer m_InputTimeSelector
Definition: mitkRGBToRGBACastImageFilter.h:71
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::BaseDataSource
Superclass of all classes generating some kind of mitk::BaseData.
Definition: mitkBaseDataSource.h:71
mitk::RGBToRGBACastImageFilter::FloatRGBPixelType
itk::RGBPixel< float > FloatRGBPixelType
Definition: mitkRGBToRGBACastImageFilter.h:53
mitk::RGBToRGBACastImageFilter
Definition: mitkRGBToRGBACastImageFilter.h:33
MitkCoreExports.h
mitk::RGBToRGBACastImageFilter::DoubleRGBPixelType
itk::RGBPixel< double > DoubleRGBPixelType
Definition: mitkRGBToRGBACastImageFilter.h:54
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
mitk::RGBToRGBACastImageFilter::m_OutputTimeSelector
mitk::ImageTimeSelector::Pointer m_OutputTimeSelector
Definition: mitkRGBToRGBACastImageFilter.h:72
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
itk::Image
class ITK_EXPORT Image
Definition: mitkGeometryClipImageFilter.h:25
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15
mitk::ImageToImageFilter
Superclass of all classes having one or more Images as input and generating Images as output.
Definition: mitkImageToImageFilter.h:25
mitk::RGBToRGBACastImageFilter::m_TimeOfHeaderInitialization
itk::TimeStamp m_TimeOfHeaderInitialization
Definition: mitkRGBToRGBACastImageFilter.h:76