Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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_HEADER_INCLUDED
14 #define MITKRGBTORGBACASTIMAGEFILTER_H_HEADER_INCLUDED
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 /* MITKRGBTORGBACASTIMAGEFILTER_H_HEADER_INCLUDED */
#define MITKCORE_EXPORT
itk::RGBPixel< unsigned char > UCRGBPixelType
Superclass of all classes generating some kind of mitk::BaseData.
DataCollection - Class to facilitate loading/accessing structured data.
mitk::ImageTimeSelector::Pointer m_InputTimeSelector
mitk::ImageTimeSelector::Pointer m_OutputTimeSelector
class ITK_EXPORT Image
itk::RGBPixel< unsigned short > USRGBPixelType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
Superclass of all classes having one or more Images as input and generating Images as output...
mitk::Image::Pointer image