Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
The spectral unmixing filter base is designed as superclass for several spectral unmixing filter eg. Eigen- or Vigrabased ones. One can add wavelengths and chromophores and get a unmixed output images out of one MITK input image using algorithms from the subclasses. More...
#include <mitkPASpectralUnmixingFilterBase.h>
Public Member Functions | |
mitkClassMacro (SpectralUnmixingFilterBase, mitk::ImageToImageFilter) | |
void | AddChromophore (mitk::pa::PropertyCalculator::ChromophoreType chromophore) |
AddChromophore takes mitk::pa::PropertyCalculator::ChromophoreType and writes them at the end of the m_Chromophore vector. The call of the method sets the order of the GetOutput method! More... | |
void | AddWavelength (int wavelength) |
AddWavelength takes integers and writes them at the end of the m_Wavelength vector. The first call of the method then corresponds to the first input image and so on. More... | |
virtual void | Verbose (bool verbose) |
virtual void | AddOutputs (unsigned int outputs) |
AddOutputs takes an integer and sets indexed outputs. More... | |
virtual void | RelativeError (bool relativeError) |
virtual void | AddRelativeErrorSettings (int value) |
AddRelativeErrorSettings takes integers and writes them at the end of the m_RelativeErrorSettings vector. More... | |
![]() | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual void | SetInput (const InputImageType *image) |
virtual void | SetInput (unsigned int, const InputImageType *image) |
InputImageType * | GetInput (void) |
InputImageType * | GetInput (unsigned int idx) |
const InputImageType * | GetInput (void) const |
const InputImageType * | GetInput (unsigned int idx) const |
![]() | |
Pointer | Clone () const |
OutputType * | GetOutput () |
Get the output data of this image source object. More... | |
const OutputType * | GetOutput () const |
OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
itk::DataObject::Pointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
Make a DataObject of the correct type to used as the specified output. More... | |
itk::DataObject::Pointer | MakeOutput (const DataObjectIdentifierType &name) override |
virtual vtkImageData * | GetVtkImageData () |
virtual const vtkImageData * | GetVtkImageData () const |
![]() | |
OutputType * | GetOutput () |
const OutputType * | GetOutput () const |
OutputType * | GetOutput (DataObjectPointerArraySizeType idx) |
const OutputType * | GetOutput (DataObjectPointerArraySizeType idx) const |
virtual void | GraftOutput (OutputType *output) |
Graft the specified BaseData onto this BaseDataSource's output. More... | |
virtual void | GraftOutput (const DataObjectIdentifierType &key, OutputType *output) |
virtual void | GraftNthOutput (unsigned int idx, OutputType *output) |
Graft the specified base data object onto this BaseDataSource's idx'th output. More... | |
bool | Updating () const |
Access itk::ProcessObject::m_Updating. More... | |
Public Attributes | |
ofstream | myfile |
Protected Member Functions | |
SpectralUnmixingFilterBase () | |
Constructor creats proptery calculater smart pointer new() More... | |
~SpectralUnmixingFilterBase () override | |
virtual Eigen::VectorXf | SpectralUnmixingAlgorithm (Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > endmemberMatrix, Eigen::VectorXf inputVector)=0 |
The subclasses will override the mehtod to calculate the spectral unmixing result vector. More... | |
![]() | |
ImageToImageFilter () | |
~ImageToImageFilter () override | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
void | GenerateInputRequestedRegion () override |
![]() | |
ImageSource () | |
~ImageSource () override | |
void | GenerateData () override |
A version of GenerateData() specific for image processing filters. More... | |
virtual void | ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) |
If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). More... | |
void | PrepareOutputs () override |
This method is intentionally left blank. More... | |
virtual void | AllocateOutputs () |
The GenerateData method normally allocates the buffers for all of the outputs of a filter. More... | |
virtual void | BeforeThreadedGenerateData () |
If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). More... | |
virtual void | AfterThreadedGenerateData () |
If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). More... | |
virtual unsigned int | SplitRequestedRegion (unsigned int i, unsigned int num, OutputImageRegionType &splitRegion) |
Split the output's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". More... | |
![]() | |
BaseDataSource () | |
~BaseDataSource () override | |
Protected Attributes | |
bool | m_Verbose |
bool | m_RelativeError |
std::vector< mitk::pa::PropertyCalculator::ChromophoreType > | m_Chromophore |
std::vector< int > | m_Wavelength |
std::vector< int > | m_RelativeErrorSettings |
Additional Inherited Members | |
![]() | |
typedef ImageToImageFilter | Self |
typedef ImageSource | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef Superclass::OutputImageRegionType | OutputImageRegionType |
typedef mitk::Image | InputImageType |
typedef InputImageType::Pointer | InputImagePointer |
typedef InputImageType::ConstPointer | InputImageConstPointer |
typedef SlicedData::RegionType | InputImageRegionType |
![]() | |
typedef ImageSource | Self |
typedef BaseDataSource | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef mitk::Image | OutputImageType |
Some convenient typedefs. More... | |
typedef OutputImageType | OutputType |
typedef OutputImageType::Pointer | OutputImagePointer |
typedef SlicedData::RegionType | OutputImageRegionType |
![]() | |
typedef BaseDataSource | Self |
typedef itk::ProcessObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef BaseData | OutputType |
typedef itk::DataObject::DataObjectIdentifierType | DataObjectIdentifierType |
![]() | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
![]() | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Method for creation through the object factory. More... | |
![]() | |
static const char * | GetStaticNameOfClass () |
![]() | |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
Static function used as a "callback" by the MultiThreader. More... | |
![]() | |
static Pointer | New () |
The spectral unmixing filter base is designed as superclass for several spectral unmixing filter eg. Eigen- or Vigrabased ones. One can add wavelengths and chromophores and get a unmixed output images out of one MITK input image using algorithms from the subclasses.
Input: The unmixing input has to be a 3D MITK image where the XY-plane is a image and the Z-direction represents recordings for different wavelengths. Herein a XY-plane for a specific Z-direction will be called "image". Every image has to be assigned to a certain wavelength. The "AddWavelength" uses "push_back" to write float values into a vector. The first wavelength will correspond to the first image!!! If there a more input images 'I' then added wavelengths 'w' the filter base interprets the next x images as repetition sequence of the same wavelengths. If I % w !=0 the surplus image(s) will be dropped. Addtionaly one has to add chromophores from the property calculator class enum "ChromophoreType" with the "AddChromophore" method. This method as well uses "push_back" but the chosen (arbitary) order will be the order of the outputs.
Output: The output will be one MITK image per chosen chromophore. Where the XY-plane is a image and the Z-direction represents recordings for different sequences. Furthermore it is possible to creat an output image that contains the information about the relative error between unmixing result and the input image.
Subclasses:
Possible exceptions:
Definition at line 63 of file mitkPASpectralUnmixingFilterBase.h.
|
protected |
Constructor creats proptery calculater smart pointer new()
Definition at line 23 of file mitkPASpectralUnmixingFilterBase.cpp.
References mitk::pa::PropertyCalculator::New().
|
overrideprotected |
Definition at line 28 of file mitkPASpectralUnmixingFilterBase.cpp.
void mitk::pa::SpectralUnmixingFilterBase::AddChromophore | ( | mitk::pa::PropertyCalculator::ChromophoreType | chromophore | ) |
AddChromophore takes mitk::pa::PropertyCalculator::ChromophoreType and writes them at the end of the m_Chromophore vector. The call of the method sets the order of the GetOutput method!
chromophore | has to be element of porperty calculater enum chromophore type |
Definition at line 47 of file mitkPASpectralUnmixingFilterBase.cpp.
References m_Chromophore.
|
virtual |
AddOutputs takes an integer and sets indexed outputs.
outputs | integer correponds to the number of output images |
if | outputs == 0 |
Definition at line 33 of file mitkPASpectralUnmixingFilterBase.cpp.
References mitkThrow, and mitk::Image::New().
|
virtual |
AddRelativeErrorSettings takes integers and writes them at the end of the m_RelativeErrorSettings vector.
value | has to be a integer |
Definition at line 62 of file mitkPASpectralUnmixingFilterBase.cpp.
References mitk::ImageWriteAccessor::GetData(), mitk::ImageAccessorBase::GetData(), mitk::Image::GetDimensions(), mitk::ImageToImageFilter::GetInput(), mitk::ImageSource::GetOutput(), m_Chromophore, m_RelativeError, m_RelativeErrorSettings, m_Verbose, m_Wavelength, MITK_INFO, MITK_WARN, mitkThrow, myfile, and SpectralUnmixingAlgorithm().
void mitk::pa::SpectralUnmixingFilterBase::AddWavelength | ( | int | wavelength | ) |
AddWavelength takes integers and writes them at the end of the m_Wavelength vector. The first call of the method then corresponds to the first input image and so on.
wavelength | database supports integers between 300 and 1000 nm |
Definition at line 42 of file mitkPASpectralUnmixingFilterBase.cpp.
References m_Wavelength.
mitk::pa::SpectralUnmixingFilterBase::mitkClassMacro | ( | SpectralUnmixingFilterBase | , |
mitk::ImageToImageFilter | |||
) |
|
virtual |
Definition at line 57 of file mitkPASpectralUnmixingFilterBase.cpp.
References m_RelativeError.
|
protectedpure virtual |
The subclasses will override the mehtod to calculate the spectral unmixing result vector.
endmemberMatrix | Matrix with number of chromophores colums and number of wavelengths rows so matrix element (i,j) contains the absorbtion of chromophore j @ wavelength i taken from the database by PropertyElement method. |
inputVector | Vector containing values of one pixel of XY-plane image with number of wavelength rows (z-dimension of a sequenece) so the pixelvalue of the first wavelength is stored in inputVector[0] and so on. |
if | algorithm implementiation fails (implemented for the algorithms with critical requirements) |
Implemented in mitk::pa::SpectralUnmixingFilterVigra, and mitk::pa::LinearSpectralUnmixingFilter.
Referenced by AddRelativeErrorSettings().
|
virtual |
Definition at line 52 of file mitkPASpectralUnmixingFilterBase.cpp.
|
protected |
Definition at line 132 of file mitkPASpectralUnmixingFilterBase.h.
Referenced by AddChromophore(), and AddRelativeErrorSettings().
|
protected |
Definition at line 130 of file mitkPASpectralUnmixingFilterBase.h.
Referenced by AddRelativeErrorSettings(), and RelativeError().
|
protected |
Definition at line 134 of file mitkPASpectralUnmixingFilterBase.h.
Referenced by AddRelativeErrorSettings().
|
protected |
Definition at line 129 of file mitkPASpectralUnmixingFilterBase.h.
Referenced by AddRelativeErrorSettings(), and Verbose().
|
protected |
Definition at line 133 of file mitkPASpectralUnmixingFilterBase.h.
Referenced by AddRelativeErrorSettings(), and AddWavelength().
ofstream mitk::pa::SpectralUnmixingFilterBase::myfile |
Definition at line 109 of file mitkPASpectralUnmixingFilterBase.h.
Referenced by AddRelativeErrorSettings(), and mitk::pa::SpectralUnmixingFilterSimplex::~SpectralUnmixingFilterSimplex().