GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
GoImageProcessor Struct Referenceabstract

Interface between image reader and vtkImageData. More...

#include <Code/IO/GoImage/GoImageProcessor.h>

Inheritance diagram for GoImageProcessor:
Inheritance graph
[legend]

Public Member Functions

vtkSmartPointer< vtkLookupTable > createLUT (const double &iRed, const double &iGreen, const double &iBlue, const double &iAlpha)
 create a lookuptable (LUT) given r, g, b, a and range LUT will go from black to the color. More...
 
std::map< unsigned int,
unsigned int > 
getAlpha (const std::string &iName) const
 get points to update r, g, b and a TFs in TF editor. More...
 
unsigned int * getBoundsChannel ()
 
unsigned int * getBoundsTime ()
 
std::string getChannelName (const unsigned int &iIndex)
 get name of a channel given its index. More...
 
std::vector< double > getColor (const std::string &iName) const
 get color from channel name. More...
 
std::vector< vtkImageData * > getColoredImages ()
 get all the visible images colored separately (N images). More...
 
unsigned int getDopplerChannel ()
 
bool getDopplerMode ()
 
unsigned int getDopplerSize ()
 
unsigned int getDopplerStep ()
 
std::vector< int > getDopplerTime (unsigned int iTime)
 
int * getExtent ()
 
vtkSmartPointer
< vtkImageAccumulate > 
getHistogram (const std::string &iName) const
 get histogram from 1 channel image More...
 
vtkSmartPointer< vtkImageData > getImageBW (const std::string &iName)
 get raw (not colored) image given index More...
 
vtkSmartPointer< vtkImageData > getImageBW (const unsigned int &iIndex)
 
vtkSmartPointer< vtkImageData > getImageBW ()
 get first raw (not colored) visible image More...
 
template<class PixelType , const unsigned int VImageDimension>
itk::Image< PixelType,
VImageDimension >::Pointer 
getImageITK (std::string iIndex, bool iIsInverted=false)
 get an ITK image (vs vtkImageData) given its index More...
 
vtkSmartPointer< vtkLookupTable > getLookuptable (const std::string &iName) const
 get LUT from channel name. Useful for the Transfer function editor. More...
 
vtkSmartPointer< vtkLookupTable > getLookuptable () const
 get LUT of the first visible channel. Useful is we are in single channel visualization mode. More...
 
std::vector< int > getLUTParameters (const std::string &iName)
 
int getMaxImage ()
 
int getMaxThreshold ()
 
unsigned int getNumberOfChannels ()
 
unsigned int getNumberOfTimePoints ()
 
unsigned int getNumberOfVisibleChannels ()
 get number of visible channels More...
 
vtkSmartPointer
< vtkPiecewiseFunction > 
getOpacityTransferFunction (const std::string &iName) const
 get opacity from channel name. Useful for the transfer function editor while volume rendering. More...
 
std::vector
< vtkPiecewiseFunction * > 
getOpacityTransferFunctions ()
 get vector of visible opacity transfer functions. Useful for the transfer function editor while volume rendering. More...
 
unsigned int getTimeInterval () const
 
vtkSmartPointer< vtkImageData > getVisibleImages ()
 get all the -visible- images present in the containerl. Colors the image and combuine them into 1 image. More...
 
 GoImageProcessor ()
 
 GoImageProcessor (const GoImageProcessor &iE)
 
virtual void initTimePoint (const unsigned int &iTime)=0
 load all the channels for the given time point into the GoMegaImageStructure More...
 
void setColor (const std::string &iName, std::vector< double > &iColor)
 
virtual void setDoppler (const unsigned int &iTime, const unsigned int &iPrevious)=0
 load all time points of the given channel into the GoMegaImageStructure. Called Doppler View. More...
 
void setDopplerMode (const bool &iEnable, const unsigned int &iChannel)
 
void setDopplerSize (int iSize)
 
void setDopplerStep (unsigned int iStep)
 
void setLUTParameters (const std::string &iName, int iGamma, int iMin, int iMax)
 
virtual void setTimePoint (const unsigned int &iTime)=0
 update images from the current GoMegaImageStructure More...
 
void updatePoints (std::string iChannel, std::map< unsigned int, unsigned int > iPointsAlpha)
 store points from TF editor More...
 
void visibilityChanged (std::string iName, bool iVisibility)
 change visibility of one channel given its name. More...
 
virtual ~GoImageProcessor ()
 

Protected Member Functions

vtkSmartPointer< vtkImageData > colorImage (vtkSmartPointer< vtkImageData > iImage, vtkSmartPointer< vtkLookupTable > iLUT)
 

Protected Attributes

unsigned int m_BoundsChannel [2]
 
unsigned int m_BoundsTime [2]
 
unsigned int m_CurrentTimePoint
 
unsigned int m_DopplerChannel
 
bool m_DopplerMode
 
unsigned int m_DopplerSize
 
unsigned int m_DopplerStep
 
std::vector< int > m_DopplerTime
 
int m_Extent [6]
 
int m_MaxImage
 
int m_MaxThreshold
 
GoMegaImageStructureMultiIndexContainer m_MegaImageContainer
 
vtkSmartPointer< vtkImageData > m_Output
 
unsigned int m_TimeInterval
 

Private Member Functions

GoImageProcessoroperator= (const GoImageProcessor &rhs)
 

Friends

std::ostream & operator<< (std::ostream &os, const GoImageProcessor &c)
 

Detailed Description

Interface between image reader and vtkImageData.

Definition at line 205 of file GoImageProcessor.h.

Constructor & Destructor Documentation

GoImageProcessor::GoImageProcessor ( )

Constructor

Definition at line 56 of file GoImageProcessor.cxx.

GoImageProcessor::GoImageProcessor ( const GoImageProcessor iE)

Constructor

Definition at line 79 of file GoImageProcessor.cxx.

GoImageProcessor::~GoImageProcessor ( )
virtual

Destructor

Definition at line 102 of file GoImageProcessor.cxx.

Member Function Documentation

vtkSmartPointer< vtkImageData > GoImageProcessor::colorImage ( vtkSmartPointer< vtkImageData >  iImage,
vtkSmartPointer< vtkLookupTable >  iLUT 
)
protected

Definition at line 300 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkLookupTable > GoImageProcessor::createLUT ( const double &  iRed,
const double &  iGreen,
const double &  iBlue,
const double &  iAlpha 
)

create a lookuptable (LUT) given r, g, b, a and range LUT will go from black to the color.

Parameters
[in]iRedred value
[in]iGreengreen value
[in]iBlueblue value
[in]iAlphaalpha value
Returns
new LUT

Definition at line 110 of file GoImageProcessor.cxx.

std::map< unsigned int, unsigned int > GoImageProcessor::getAlpha ( const std::string &  iName) const

get points to update r, g, b and a TFs in TF editor.

Parameters
[in]iNamechannel of interest. (See getChannelName(index) to get channel name from index.)
Returns
vector of map.1 vector: rgba, map: position/value

Definition at line 272 of file GoImageProcessor.cxx.

unsigned int * GoImageProcessor::getBoundsChannel ( )

Definition at line 474 of file GoImageProcessor.cxx.

unsigned int * GoImageProcessor::getBoundsTime ( )

Definition at line 465 of file GoImageProcessor.cxx.

std::string GoImageProcessor::getChannelName ( const unsigned int &  iIndex)

get name of a channel given its index.

Parameters
[in]iIndexrequested index
Returns
channel name

Definition at line 618 of file GoImageProcessor.cxx.

std::vector< double > GoImageProcessor::getColor ( const std::string &  iName) const

get color from channel name.

Parameters
[in]iNamechannel of interest. (See getChannelName(index) to get channel name from index.)
Returns
vector of double: rgba [0-255]

Definition at line 208 of file GoImageProcessor.cxx.

std::vector< vtkImageData * > GoImageProcessor::getColoredImages ( )

get all the visible images colored separately (N images).

Returns
vector containing all the visible colored images

Definition at line 364 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getDopplerChannel ( )

Definition at line 590 of file GoImageProcessor.cxx.

bool GoImageProcessor::getDopplerMode ( )

Definition at line 583 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getDopplerSize ( )

Definition at line 599 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getDopplerStep ( )

Definition at line 527 of file GoImageProcessor.cxx.

std::vector< int > GoImageProcessor::getDopplerTime ( unsigned int  iTime)

Definition at line 545 of file GoImageProcessor.cxx.

int * GoImageProcessor::getExtent ( )

Definition at line 483 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkImageAccumulate > GoImageProcessor::getHistogram ( const std::string &  iName) const

get histogram from 1 channel image

Parameters
[in]iChannelchannel of interest.
Returns
pointer to histogram

Definition at line 286 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkImageData > GoImageProcessor::getImageBW ( const std::string &  iName)

get raw (not colored) image given index

Parameters
[in]iIndexrequested index
Note
Used to compute the mesh attributes at load time
Returns
raw image.

Definition at line 319 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkImageData > GoImageProcessor::getImageBW ( const unsigned int &  iIndex)

Definition at line 333 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkImageData > GoImageProcessor::getImageBW ( )

get first raw (not colored) visible image

Parameters
[in]iIndexrequested index
Returns
raw image.

Definition at line 348 of file GoImageProcessor.cxx.

template<class PixelType , const unsigned int VImageDimension>
itk::Image< PixelType, VImageDimension >::Pointer GoImageProcessor::getImageITK ( std::string  iIndex,
bool  iIsInverted = false 
)
inline

get an ITK image (vs vtkImageData) given its index

Returns
ITK image pointer

Definition at line 381 of file GoImageProcessor.h.

vtkSmartPointer< vtkLookupTable > GoImageProcessor::getLookuptable ( const std::string &  iName) const

get LUT from channel name. Useful for the Transfer function editor.

Parameters
[in]iNamechannel of interest. (See getChannelName(index) to get channel name from index.)
Returns
pointer to LUT

Definition at line 136 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkLookupTable > GoImageProcessor::getLookuptable ( ) const

get LUT of the first visible channel. Useful is we are in single channel visualization mode.

Parameters
[in]iNamechannel of interest. (See getChannelName(index) to get channel name from index.)
Returns
pointer to LUT

Definition at line 153 of file GoImageProcessor.cxx.

std::vector< int > GoImageProcessor::getLUTParameters ( const std::string &  iName)

Definition at line 253 of file GoImageProcessor.cxx.

int GoImageProcessor::getMaxImage ( )

Definition at line 697 of file GoImageProcessor.cxx.

int GoImageProcessor::getMaxThreshold ( )

Definition at line 688 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getNumberOfChannels ( )

Definition at line 509 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getNumberOfTimePoints ( )

Definition at line 500 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getNumberOfVisibleChannels ( )

get number of visible channels

Returns
number of visible channels

Definition at line 649 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkPiecewiseFunction > GoImageProcessor::getOpacityTransferFunction ( const std::string &  iName) const

get opacity from channel name. Useful for the transfer function editor while volume rendering.

Parameters
[in]iNamechannel of interest. (See getChannelName(index) to get channel name from index.)
Returns
pointer to opacity Transfer Function

Definition at line 167 of file GoImageProcessor.cxx.

std::vector< vtkPiecewiseFunction * > GoImageProcessor::getOpacityTransferFunctions ( )

get vector of visible opacity transfer functions. Useful for the transfer function editor while volume rendering.

Returns
vector of pointer to opacity TF

Definition at line 184 of file GoImageProcessor.cxx.

unsigned int GoImageProcessor::getTimeInterval ( ) const

Definition at line 518 of file GoImageProcessor.cxx.

vtkSmartPointer< vtkImageData > GoImageProcessor::getVisibleImages ( )

get all the -visible- images present in the containerl. Colors the image and combuine them into 1 image.

Returns
1 colored image.

Definition at line 391 of file GoImageProcessor.cxx.

virtual void GoImageProcessor::initTimePoint ( const unsigned int &  iTime)
pure virtual

load all the channels for the given time point into the GoMegaImageStructure

Parameters
[in]iTimerequested time point

Implemented in GoLSMImageProcessor, and GoMegaImageProcessor.

GoImageProcessor& GoImageProcessor::operator= ( const GoImageProcessor rhs)
inlineprivate

Definition at line 492 of file GoImageProcessor.h.

void GoImageProcessor::setColor ( const std::string &  iName,
std::vector< double > &  iColor 
)

Definition at line 222 of file GoImageProcessor.cxx.

virtual void GoImageProcessor::setDoppler ( const unsigned int &  iTime,
const unsigned int &  iPrevious 
)
pure virtual

load all time points of the given channel into the GoMegaImageStructure. Called Doppler View.

Parameters
[in]iTimerequested central time point
[in]iPrevious-to be used for optimization?
Note
need to store parameters if we want to go through volume efficiently (not reload everything all the time)

Implemented in GoLSMImageProcessor, and GoMegaImageProcessor.

void GoImageProcessor::setDopplerMode ( const bool &  iEnable,
const unsigned int &  iChannel 
)

Definition at line 573 of file GoImageProcessor.cxx.

void GoImageProcessor::setDopplerSize ( int  iSize)

Definition at line 608 of file GoImageProcessor.cxx.

void GoImageProcessor::setDopplerStep ( unsigned int  iStep)

Definition at line 536 of file GoImageProcessor.cxx.

void GoImageProcessor::setLUTParameters ( const std::string &  iName,
int  iGamma,
int  iMin,
int  iMax 
)

Definition at line 237 of file GoImageProcessor.cxx.

virtual void GoImageProcessor::setTimePoint ( const unsigned int &  iTime)
pure virtual

update images from the current GoMegaImageStructure

Parameters
[in]iTimerequested time point

Implemented in GoLSMImageProcessor, and GoMegaImageProcessor.

void GoImageProcessor::updatePoints ( std::string  iChannel,
std::map< unsigned int, unsigned int >  iPointsAlpha 
)

store points from TF editor

Parameters
[in]iChannelchannel of interest.
[in]iPointsRGBAnew points

Definition at line 673 of file GoImageProcessor.cxx.

void GoImageProcessor::visibilityChanged ( std::string  iName,
bool  iVisibility 
)

change visibility of one channel given its name.

Parameters
[in]iNamechannel of interest
[in]iVisibilitynew visibility

Definition at line 634 of file GoImageProcessor.cxx.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const GoImageProcessor c 
)
friend

Printing one element. std::cout << element << std::endl;

Definition at line 220 of file GoImageProcessor.h.

Member Data Documentation

unsigned int GoImageProcessor::m_BoundsChannel[2]
protected

Definition at line 474 of file GoImageProcessor.h.

unsigned int GoImageProcessor::m_BoundsTime[2]
protected

Definition at line 473 of file GoImageProcessor.h.

unsigned int GoImageProcessor::m_CurrentTimePoint
protected

Definition at line 469 of file GoImageProcessor.h.

unsigned int GoImageProcessor::m_DopplerChannel
protected

Definition at line 486 of file GoImageProcessor.h.

bool GoImageProcessor::m_DopplerMode
protected

Definition at line 483 of file GoImageProcessor.h.

unsigned int GoImageProcessor::m_DopplerSize
protected

Definition at line 487 of file GoImageProcessor.h.

unsigned int GoImageProcessor::m_DopplerStep
protected

Definition at line 484 of file GoImageProcessor.h.

std::vector<int> GoImageProcessor::m_DopplerTime
protected

Definition at line 485 of file GoImageProcessor.h.

int GoImageProcessor::m_Extent[6]
protected

Definition at line 475 of file GoImageProcessor.h.

int GoImageProcessor::m_MaxImage
protected

Definition at line 478 of file GoImageProcessor.h.

int GoImageProcessor::m_MaxThreshold
protected

Definition at line 477 of file GoImageProcessor.h.

GoMegaImageStructureMultiIndexContainer GoImageProcessor::m_MegaImageContainer
protected

Definition at line 466 of file GoImageProcessor.h.

vtkSmartPointer<vtkImageData> GoImageProcessor::m_Output
protected

Definition at line 467 of file GoImageProcessor.h.

unsigned int GoImageProcessor::m_TimeInterval
protected

Definition at line 476 of file GoImageProcessor.h.


The documentation for this struct was generated from the following files: