Public Types | Public Member Functions

mitk::mitkColourImageProcessor Class Reference

#include <mitkColourImageProcessor.h>

List of all members.

Public Types

typedef itk::RGBAPixel
< unsigned char > 
RGBAPixel
typedef itk::Image< RGBAPixel, 3 > RGBAImage

Public Member Functions

 mitkColourImageProcessor ()
 ~mitkColourImageProcessor ()
mitk::Image::Pointer convertToRGBAImage (mitk::Image::Pointer input, mitk::TransferFunction::Pointer tf)
mitk::Image::Pointer convertWithBinaryToRGBAImage (mitk::Image::Pointer input1, mitk::Image::Pointer input2, mitk::TransferFunction::Pointer tf)
mitk::Image::Pointer convertWithBinaryAndColorToRGBAImage (mitk::Image::Pointer input1, mitk::Image::Pointer input2, mitk::TransferFunction::Pointer tf, int *color)
mitk::Image::Pointer combineRGBAImage (mitk::Image::Pointer input1, mitk::Image::Pointer input2)

Detailed Description

Definition at line 34 of file mitkColourImageProcessor.h.


Member Typedef Documentation

Definition at line 40 of file mitkColourImageProcessor.h.

typedef itk::RGBAPixel<unsigned char> mitk::mitkColourImageProcessor::RGBAPixel

Definition at line 39 of file mitkColourImageProcessor.h.


Constructor & Destructor Documentation

mitk::mitkColourImageProcessor::mitkColourImageProcessor (  )

Definition at line 21 of file mitkColourImageProcessor.cpp.

Referenced by ~mitkColourImageProcessor().

{
mitk::mitkColourImageProcessor::~mitkColourImageProcessor (  )

Definition at line 25 of file mitkColourImageProcessor.cpp.

References mitkColourImageProcessor().

{


Member Function Documentation

mitk::Image::Pointer mitk::mitkColourImageProcessor::combineRGBAImage ( mitk::Image::Pointer  input1,
mitk::Image::Pointer  input2 
)

Definition at line 957 of file mitkColourImageProcessor.cpp.

Referenced by QmitkColourImageProcessingView::OnCombineRGBA().

{
  
  RGBAImage::Pointer itk1,itk2;

mitk::Image::Pointer mitk::mitkColourImageProcessor::convertToRGBAImage ( mitk::Image::Pointer  input,
mitk::TransferFunction::Pointer  tf 
)

Definition at line 257 of file mitkColourImageProcessor.cpp.

Referenced by QmitkColourImageProcessingView::OnConvertImageMaskColorToRGBAImage(), and QmitkColourImageProcessingView::OnConvertToRGBAImage().

{
  MITK_INFO << "convertToRGBAImage" ;
  
  mitk::Image::Pointer mitkResult= mitk::Image::New();
 
  if (*mitkInput->GetPixelType().GetTypeId() == typeid(unsigned char))
  {
    //cast to itkImage
    itk::Image< unsigned char, 3 >::Pointer itkInput;
    mitk::CastToItkImage(mitkInput,itkInput);
    mitkResult = ScalarToRGBA<unsigned char>(itkInput, tf);
  }
  else if (*mitkInput->GetPixelType().GetTypeId() == typeid(short))
  {
    //cast to itkImage
    itk::Image< short, 3 >::Pointer itkInput;
    mitk::CastToItkImage(mitkInput,itkInput);
    mitkResult = ScalarToRGBA<short>(itkInput, tf);
  }
  else
  {
    MITK_ERROR << "unsupported pixel type";
    return NULL;
mitk::Image::Pointer mitk::mitkColourImageProcessor::convertWithBinaryAndColorToRGBAImage ( mitk::Image::Pointer  input1,
mitk::Image::Pointer  input2,
mitk::TransferFunction::Pointer  tf,
int *  color 
)

Definition at line 837 of file mitkColourImageProcessor.cpp.

Referenced by QmitkColourImageProcessingView::OnConvertImageMaskColorToRGBAImage().

{
  MITK_INFO << "convertWithBinaryToRGBAImage" ;
    
  itk::Image< short, 3 >::Pointer inputCT;
  itk::Image< unsigned char, 3 >::Pointer inputBinary;
 
  if (*input1->GetPixelType().GetTypeId() == typeid(unsigned char) && *input2->GetPixelType().GetTypeId() == typeid(short))
  {
    mitk::CastToItkImage(input1,inputBinary);
    mitk::CastToItkImage(input2,inputCT);
  }
  else if (*input1->GetPixelType().GetTypeId() == typeid(short) && *input2->GetPixelType().GetTypeId() == typeid(unsigned char))
  {
    mitk::CastToItkImage(input1,inputCT);
    mitk::CastToItkImage(input2,inputBinary);
  }
  else
mitk::Image::Pointer mitk::mitkColourImageProcessor::convertWithBinaryToRGBAImage ( mitk::Image::Pointer  input1,
mitk::Image::Pointer  input2,
mitk::TransferFunction::Pointer  tf 
)

Definition at line 550 of file mitkColourImageProcessor.cpp.

Referenced by QmitkColourImageProcessingView::OnConvertToRGBAImage().

{
  MITK_INFO << "convertWithBinaryToRGBAImage" ;
    
  itk::Image< short, 3 >::Pointer inputCT;
  itk::Image< unsigned char, 3 >::Pointer inputBinary;
 
  if (*input1->GetPixelType().GetTypeId() == typeid(unsigned char) && *input2->GetPixelType().GetTypeId() == typeid(short))
  {
    mitk::CastToItkImage(input1,inputBinary);
    mitk::CastToItkImage(input2,inputCT);
  }
  else if (*input1->GetPixelType().GetTypeId() == typeid(short) && *input2->GetPixelType().GetTypeId() == typeid(unsigned char))
  {
    mitk::CastToItkImage(input1,inputCT);
    mitk::CastToItkImage(input2,inputBinary);
  }
  else

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines