Medical Imaging Interaction Toolkit  2025.12.02
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 
59 
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
#define MITKCORE_EXPORT
Superclass of all classes generating Images (instances of class Image) as output.
Superclass of all classes having one or more Images as input and generating Images as output.
Image class for storing images.
Definition: mitkImage.h:70
void GenerateInputRequestedRegion() override
itk::RGBPixel< unsigned char > UCRGBPixelType
itk::RGBPixel< unsigned short > USRGBPixelType
mitk::ImageTimeSelector::Pointer m_OutputTimeSelector
void InternalCast(itk::Image< TPixel, VImageDimension > *itkImage, mitk::RGBToRGBACastImageFilter *addComponentFilter, typename TPixel::ComponentType defaultAlpha)
mitk::ImageTimeSelector::Pointer m_InputTimeSelector
void GenerateOutputInformation() override
static bool IsRGBImage(const mitk::Image *image)
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
class ITK_EXPORT Image
Find image slices visible on a given plane.