Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKRGBTORGBACASTIMAGEFILTER_H_HEADER_INCLUDED
18 #define MITKRGBTORGBACASTIMAGEFILTER_H_HEADER_INCLUDED
19 
20 #include "mitkImageTimeSelector.h"
21 #include "mitkImageToImageFilter.h"
22 #include <MitkCoreExports.h>
23 
24 #include <itkRGBPixel.h>
25 
26 namespace itk
27 {
28  template <class TPixel, unsigned int VImageDimension>
29  class ITK_EXPORT Image;
30 }
31 
32 namespace mitk
33 {
34  //##Documentation
35  //## @brief
36  //## @ingroup Process
38  {
39  public:
41 
42  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
43 
49  static bool IsRGBImage(const mitk::Image *image);
50 
51  protected:
52  // Typedefs for supported RGB pixel types
53  typedef itk::RGBPixel<unsigned char> UCRGBPixelType;
54  typedef itk::RGBPixel<unsigned short> USRGBPixelType;
55  typedef itk::RGBPixel<float> FloatRGBPixelType;
56  typedef itk::RGBPixel<double> DoubleRGBPixelType;
57 
59 
61 
62  virtual void GenerateInputRequestedRegion() override;
63 
64  virtual void GenerateOutputInformation() override;
65 
66  virtual void GenerateData() override;
67 
68  template <typename TPixel, unsigned int VImageDimension>
69  void InternalCast(itk::Image<TPixel, VImageDimension> *itkImage,
70  mitk::RGBToRGBACastImageFilter *addComponentFilter,
71  typename TPixel::ComponentType defaultAlpha);
72 
73  mitk::ImageTimeSelector::Pointer m_InputTimeSelector;
74  mitk::ImageTimeSelector::Pointer m_OutputTimeSelector;
75 
76  //##Description
77  //## @brief Time when Header was last initialized
78  itk::TimeStamp m_TimeOfHeaderInitialization;
79  };
80 
81 } // namespace mitk
82 
83 #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.
class ITK_EXPORT Image
itk::RGBPixel< unsigned short > USRGBPixelType
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Image class for storing images.
Definition: mitkImage.h:76
Provides access to a volume at a specific time of the input image.
Superclass of all classes having one or more Images as input and generating Images as output...