Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::DiffusionPropertyHelper Class Reference

Helper class for mitk::Images containing diffusion weighted data. More...

#include <mitkDiffusionPropertyHelper.h>

Collaboration diagram for mitk::DiffusionPropertyHelper:

Public Types

typedef short DiffusionPixelType
 
typedef mitk::BValueMapProperty::BValueMap BValueMapType
 
typedef GradientDirectionsProperty::GradientDirectionType GradientDirectionType
 
typedef GradientDirectionsProperty::GradientDirectionsContainerType GradientDirectionsContainerType
 
typedef mitk::MeasurementFrameProperty::MeasurementFrameType MeasurementFrameType
 
typedef itk::VectorImage< DiffusionPixelType, 3 > ImageType
 

Public Member Functions

 DiffusionPropertyHelper (mitk::Image *inputImage)
 Public constructor, takes a mitk::Image pointer as argument. More...
 
 ~DiffusionPropertyHelper ()
 
const BValueMapTypeGetBValueMap () const
 
float GetReferenceBValue () const
 
const MeasurementFrameTypeGetMeasurementFrame () const
 
GradientDirectionsContainerType::Pointer GetOriginalGradientContainer () const
 
GradientDirectionsContainerType::Pointer GetGradientContainer () const
 
bool IsDiffusionWeightedImage () const
 
void AverageRedundantGradients (double precision)
 
void InitializeImage ()
 Make certain the owned image is up to date with all necessary properties. More...
 
GradientDirectionsContainerType::Pointer CalcAveragedDirectionSet (double precision, GradientDirectionsContainerType::Pointer directions)
 

Static Public Member Functions

static bool IsDiffusionWeightedImage (const mitk::Image *)
 Decide whether a provided image is a valid diffusion weighted image. More...
 
static bool IsDiffusionWeightedImage (const mitk::DataNode *node)
 
static ImageType::Pointer GetItkVectorImage (Image *image)
 
static const BValueMapTypeGetBValueMap (const mitk::Image *)
 Convenience method to get the BValueMap. More...
 
static float GetReferenceBValue (const mitk::Image *)
 Convenience method to get the BValue. More...
 
static const MeasurementFrameTypeGetMeasurementFrame (const mitk::Image *)
 Convenience method to get the measurement frame. More...
 
static GradientDirectionsContainerType::Pointer GetOriginalGradientContainer (const mitk::Image *)
 Convenience method to get the original gradient directions. More...
 
static GradientDirectionsContainerType::Pointer GetGradientContainer (const mitk::Image *)
 Convenience method to get the gradient directions. More...
 

Static Public Attributes

static const std::string GRADIENTCONTAINERPROPERTYNAME
 
static const std::string ORIGINALGRADIENTCONTAINERPROPERTYNAME
 
static const std::string MEASUREMENTFRAMEPROPERTYNAME
 
static const std::string REFERENCEBVALUEPROPERTYNAME
 
static const std::string BVALUEMAPPROPERTYNAME
 
static const std::string MODALITY
 

Protected Member Functions

 DiffusionPropertyHelper ()
 
void ApplyMeasurementFrame ()
 Apply the previouse set MeasurementFrame to all gradients in the GradientsDirectionContainer (m_Directions) More...
 
void UpdateBValueMap ()
 Update the BValueMap (m_B_ValueMap) using the current gradient directions (m_Directions) More...
 
bool AreAlike (GradientDirectionType g1, GradientDirectionType g2, double precision)
 Determines whether gradients can be considered to be equal. More...
 
float GetB_Value (unsigned int i)
 Get the b value belonging to an index. More...
 

Protected Attributes

mitk::Imagem_Image
 

Detailed Description

Helper class for mitk::Images containing diffusion weighted data.

This class takes a pointer to a mitk::Image containing diffusion weighted information and provides functions to manipulate the diffusion meta-data. Will log an error if required information is missing.

Definition at line 37 of file mitkDiffusionPropertyHelper.h.

Member Typedef Documentation

Definition at line 47 of file mitkDiffusionPropertyHelper.h.

Constructor & Destructor Documentation

mitk::DiffusionPropertyHelper::DiffusionPropertyHelper ( mitk::Image inputImage)

Public constructor, takes a mitk::Image pointer as argument.

Definition at line 34 of file mitkDiffusionPropertyHelper.cpp.

mitk::DiffusionPropertyHelper::~DiffusionPropertyHelper ( )

Definition at line 40 of file mitkDiffusionPropertyHelper.cpp.

mitk::DiffusionPropertyHelper::DiffusionPropertyHelper ( )
protected

Definition at line 30 of file mitkDiffusionPropertyHelper.cpp.

Member Function Documentation

void mitk::DiffusionPropertyHelper::ApplyMeasurementFrame ( )
protected

Apply the previouse set MeasurementFrame to all gradients in the GradientsDirectionContainer (m_Directions)

Warning
first set the MeasurementFrame

Definition at line 185 of file mitkDiffusionPropertyHelper.cpp.

References GRADIENTCONTAINERPROPERTYNAME, mitk::New(), and ORIGINALGRADIENTCONTAINERPROPERTYNAME.

bool mitk::DiffusionPropertyHelper::AreAlike ( GradientDirectionType  g1,
GradientDirectionType  g2,
double  precision 
)
protected

Determines whether gradients can be considered to be equal.

Definition at line 249 of file mitkDiffusionPropertyHelper.cpp.

void mitk::DiffusionPropertyHelper::AverageRedundantGradients ( double  precision)
mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer mitk::DiffusionPropertyHelper::CalcAveragedDirectionSet ( double  precision,
GradientDirectionsContainerType::Pointer  directions 
)

Definition at line 53 of file mitkDiffusionPropertyHelper.cpp.

References mitk::New().

float mitk::DiffusionPropertyHelper::GetB_Value ( unsigned int  i)
protected

Get the b value belonging to an index.

Definition at line 258 of file mitkDiffusionPropertyHelper.cpp.

References GRADIENTCONTAINERPROPERTYNAME, and REFERENCEBVALUEPROPERTYNAME.

const mitk::DiffusionPropertyHelper::BValueMapType & mitk::DiffusionPropertyHelper::GetBValueMap ( const mitk::Image image)
static

Convenience method to get the BValueMap.

Definition at line 359 of file mitkDiffusionPropertyHelper.cpp.

References mitk::BaseData::GetProperty().

mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer mitk::DiffusionPropertyHelper::GetGradientContainer ( const mitk::Image image)
static

Convenience method to get the gradient directions.

Definition at line 388 of file mitkDiffusionPropertyHelper.cpp.

References mitk::BaseData::GetProperty().

mitk::DiffusionPropertyHelper::ImageType::Pointer mitk::DiffusionPropertyHelper::GetItkVectorImage ( mitk::Image image)
static
const mitk::DiffusionPropertyHelper::MeasurementFrameType & mitk::DiffusionPropertyHelper::GetMeasurementFrame ( const mitk::Image image)
static

Convenience method to get the measurement frame.

This method will return the measurement frame of the image.

Note
If the image has no associated measurement frame the identity will be returned.

Definition at line 369 of file mitkDiffusionPropertyHelper.cpp.

References mitk::BaseData::GetProperty(), and mitk::New().

mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer mitk::DiffusionPropertyHelper::GetOriginalGradientContainer ( const mitk::Image image)
static

Convenience method to get the original gradient directions.

Definition at line 383 of file mitkDiffusionPropertyHelper.cpp.

References mitk::BaseData::GetProperty().

mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer mitk::DiffusionPropertyHelper::GetOriginalGradientContainer ( ) const

Definition at line 413 of file mitkDiffusionPropertyHelper.cpp.

float mitk::DiffusionPropertyHelper::GetReferenceBValue ( const mitk::Image image)
static

Convenience method to get the BValue.

Definition at line 364 of file mitkDiffusionPropertyHelper.cpp.

References mitk::BaseData::GetProperty().

void mitk::DiffusionPropertyHelper::InitializeImage ( )

Make certain the owned image is up to date with all necessary properties.

This function will generate the B Value map and copy all properties to the owned image.

Definition at line 285 of file mitkDiffusionPropertyHelper.cpp.

References MEASUREMENTFRAMEPROPERTYNAME, and mitk::New().

Referenced by mitk::RegistrationWrapper::ApplyTransformationToImage(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DWIHeadMotionCorrectionFilter::GenerateData(), mitk::DiffusionDICOMFileReader::LoadSingleOutputImage(), main(), and ResampleDWIbySpacing().

bool mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage ( const mitk::Image image)
static

Decide whether a provided image is a valid diffusion weighted image.

An image will be considered a valid diffusion weighted image if the following are true

  • It has a reference b value
  • It has a gradient directions property
  • The number of gradients directions matches the number of components of the image

This does not guarantee that the data is sensible or accurate, it just verfies that it meets the formal requirements to possibly be a valid diffusion weighted image.

Definition at line 311 of file mitkDiffusionPropertyHelper.cpp.

References mitk::PixelType::GetNumberOfComponents(), mitk::Image::GetPixelType(), and mitk::BaseData::GetProperty().

bool mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage ( const mitk::DataNode node)
static

Definition at line 301 of file mitkDiffusionPropertyHelper.cpp.

References mitk::DataNode::GetData().

void mitk::DiffusionPropertyHelper::UpdateBValueMap ( )
protected

Update the BValueMap (m_B_ValueMap) using the current gradient directions (m_Directions)

Warning
Have to be called after each manipulation on the GradientDirectionContainer !especially after manipulation of the m_Directions (GetDirections()) container via pointer access!

Definition at line 218 of file mitkDiffusionPropertyHelper.cpp.

References BVALUEMAPPROPERTYNAME, GRADIENTCONTAINERPROPERTYNAME, and mitk::New().

Member Data Documentation

mitk::Image* mitk::DiffusionPropertyHelper::m_Image
protected

Definition at line 134 of file mitkDiffusionPropertyHelper.h.

const std::string mitk::DiffusionPropertyHelper::MODALITY
static

Definition at line 54 of file mitkDiffusionPropertyHelper.h.


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