Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Helper class for mitk::Images containing diffusion weighted data. More...
#include <mitkDiffusionPropertyHelper.h>
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 BValueMapType & | GetBValueMap () const |
float | GetReferenceBValue () const |
const MeasurementFrameType & | GetMeasurementFrame () 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 BValueMapType & | GetBValueMap (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 MeasurementFrameType & | GetMeasurementFrame (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::Image * | m_Image |
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.
Definition at line 43 of file mitkDiffusionPropertyHelper.h.
typedef short mitk::DiffusionPropertyHelper::DiffusionPixelType |
Definition at line 41 of file mitkDiffusionPropertyHelper.h.
typedef GradientDirectionsProperty::GradientDirectionsContainerType mitk::DiffusionPropertyHelper::GradientDirectionsContainerType |
Definition at line 45 of file mitkDiffusionPropertyHelper.h.
typedef GradientDirectionsProperty::GradientDirectionType mitk::DiffusionPropertyHelper::GradientDirectionType |
Definition at line 44 of file mitkDiffusionPropertyHelper.h.
typedef itk::VectorImage< DiffusionPixelType, 3> mitk::DiffusionPropertyHelper::ImageType |
Definition at line 47 of file mitkDiffusionPropertyHelper.h.
typedef mitk::MeasurementFrameProperty::MeasurementFrameType mitk::DiffusionPropertyHelper::MeasurementFrameType |
Definition at line 46 of file mitkDiffusionPropertyHelper.h.
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.
|
protected |
Definition at line 30 of file mitkDiffusionPropertyHelper.cpp.
|
protected |
Apply the previouse set MeasurementFrame to all gradients in the GradientsDirectionContainer (m_Directions)
Definition at line 185 of file mitkDiffusionPropertyHelper.cpp.
References GRADIENTCONTAINERPROPERTYNAME, mitk::New(), and ORIGINALGRADIENTCONTAINERPROPERTYNAME.
|
protected |
Determines whether gradients can be considered to be equal.
Definition at line 249 of file mitkDiffusionPropertyHelper.cpp.
void mitk::DiffusionPropertyHelper::AverageRedundantGradients | ( | double | precision | ) |
Definition at line 84 of file mitkDiffusionPropertyHelper.cpp.
References mitk::CastToItkImage(), mitk::GradientDirectionsProperty::GetGradientDirectionsContainer(), mitk::GrabItkImageMemory(), GRADIENTCONTAINERPROPERTYNAME, MITK_ERROR, mitk::New(), and ORIGINALGRADIENTCONTAINERPROPERTYNAME.
Referenced by main().
mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer mitk::DiffusionPropertyHelper::CalcAveragedDirectionSet | ( | double | precision, |
GradientDirectionsContainerType::Pointer | directions | ||
) |
Definition at line 53 of file mitkDiffusionPropertyHelper.cpp.
References mitk::New().
|
protected |
Get the b value belonging to an index.
Definition at line 258 of file mitkDiffusionPropertyHelper.cpp.
References GRADIENTCONTAINERPROPERTYNAME, and REFERENCEBVALUEPROPERTYNAME.
|
static |
Convenience method to get the BValueMap.
Definition at line 359 of file mitkDiffusionPropertyHelper.cpp.
References mitk::BaseData::GetProperty().
const mitk::DiffusionPropertyHelper::BValueMapType & mitk::DiffusionPropertyHelper::GetBValueMap | ( | ) | const |
Definition at line 398 of file mitkDiffusionPropertyHelper.cpp.
Referenced by mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GetTransformedHeaderInformation(), and main().
|
static |
Convenience method to get the gradient directions.
Definition at line 388 of file mitkDiffusionPropertyHelper.cpp.
References mitk::BaseData::GetProperty().
mitk::DiffusionPropertyHelper::GradientDirectionsContainerType::Pointer mitk::DiffusionPropertyHelper::GetGradientContainer | ( | ) | const |
Definition at line 418 of file mitkDiffusionPropertyHelper.cpp.
Referenced by mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GetTransformedHeaderInformation(), mitk::TrackingForestHandler< ShOrder, NumberOfSignalFeatures >::InitForTracking(), mitk::DiffusionImageCreationFilter::InternalGetGradientDirections(), KurtosisMapComputation(), main(), mitk::TrackingForestHandler< ShOrder, NumberOfSignalFeatures >::PreprocessInputDataForTraining(), ResampleDWIbySpacing(), mitk::DiffusionImageNiftiWriterService::Write(), and mitk::DiffusionImageNrrdWriterService::Write().
|
static |
Definition at line 45 of file mitkDiffusionPropertyHelper.cpp.
References mitk::CastToItkImage(), and mitk::New().
Referenced by mitk::TrackingForestHandler< ShOrder, NumberOfSignalFeatures >::InitForTracking(), main(), and mitk::TrackingForestHandler< ShOrder, NumberOfSignalFeatures >::PreprocessInputDataForTraining().
|
static |
Convenience method to get the measurement frame.
This method will return the measurement frame of the image.
Definition at line 369 of file mitkDiffusionPropertyHelper.cpp.
References mitk::BaseData::GetProperty(), and mitk::New().
const mitk::DiffusionPropertyHelper::MeasurementFrameType & mitk::DiffusionPropertyHelper::GetMeasurementFrame | ( | ) | const |
Definition at line 408 of file mitkDiffusionPropertyHelper.cpp.
Referenced by mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GetTransformedHeaderInformation(), mitk::DiffusionImageCreationFilter::InternalGetMeasurementFrame(), mitk::DiffusionImageNrrdWriterService::Write(), and mitk::DiffusionImageNiftiWriterService::Write().
|
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.
|
static |
Convenience method to get the BValue.
Definition at line 364 of file mitkDiffusionPropertyHelper.cpp.
References mitk::BaseData::GetProperty().
float mitk::DiffusionPropertyHelper::GetReferenceBValue | ( | ) | const |
Definition at line 403 of file mitkDiffusionPropertyHelper.cpp.
Referenced by mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GetTransformedHeaderInformation(), mitk::TrackingForestHandler< ShOrder, NumberOfSignalFeatures >::InitForTracking(), mitk::DiffusionImageCreationFilter::InternalGetBValue(), KurtosisMapComputation(), main(), mitk::TrackingForestHandler< ShOrder, NumberOfSignalFeatures >::PreprocessInputDataForTraining(), ResampleDWIbySpacing(), mitk::DiffusionImageNiftiWriterService::Write(), and mitk::DiffusionImageNrrdWriterService::Write().
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().
|
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
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().
|
static |
Definition at line 301 of file mitkDiffusionPropertyHelper.cpp.
References mitk::DataNode::GetData().
bool mitk::DiffusionPropertyHelper::IsDiffusionWeightedImage | ( | ) | const |
Definition at line 393 of file mitkDiffusionPropertyHelper.cpp.
Referenced by mitk::RegistrationWrapper::ApplyTransformationToImage(), mitk::NodePredicateIsDWI::CheckNode(), mitk::DiffusionImageNiftiWriterService::GetConfidenceLevel(), mitk::DiffusionImageNrrdWriterService::GetConfidenceLevel(), mitk::RegistrationWrapper::GetTransformation(), main(), and mitk::DiffusionImageCreationFilter::SetReferenceImage().
|
protected |
Update the BValueMap (m_B_ValueMap) using the current gradient directions (m_Directions)
Definition at line 218 of file mitkDiffusionPropertyHelper.cpp.
References BVALUEMAPPROPERTYNAME, GRADIENTCONTAINERPROPERTYNAME, and mitk::New().
|
static |
Definition at line 53 of file mitkDiffusionPropertyHelper.h.
Referenced by mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DWIHeadMotionCorrectionFilter::GenerateData(), mitk::DiffusionImageCreationFilter::GenerateData(), mitk::DiffusionImageNiftiReaderService::InternalRead(), mitk::DiffusionImageNrrdReaderService::InternalRead(), and UpdateBValueMap().
|
static |
Definition at line 49 of file mitkDiffusionPropertyHelper.h.
Referenced by ApplyMeasurementFrame(), mitk::RegistrationWrapper::ApplyTransformationToImage(), AverageRedundantGradients(), mitk::DiffusionImageCorrectionFilter::CorrectDirections(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DWIHeadMotionCorrectionFilter::GenerateData(), mitk::DiffusionImageCreationFilter::GenerateData(), GetB_Value(), mitk::RegistrationWrapper::GetTransformation(), mitk::DiffusionImageNiftiReaderService::InternalRead(), mitk::DiffusionImageNrrdReaderService::InternalRead(), mitk::DiffusionDICOMFileReader::LoadSingleOutputImage(), main(), ResampleDWIbySpacing(), mitk::RawShModel< ScalarType >::SampleKernels(), and UpdateBValueMap().
|
protected |
Definition at line 134 of file mitkDiffusionPropertyHelper.h.
|
static |
Definition at line 51 of file mitkDiffusionPropertyHelper.h.
Referenced by mitk::RegistrationWrapper::ApplyTransformationToImage(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DWIHeadMotionCorrectionFilter::GenerateData(), mitk::DiffusionImageCreationFilter::GenerateData(), InitializeImage(), mitk::DiffusionImageNiftiReaderService::InternalRead(), mitk::DiffusionImageNrrdReaderService::InternalRead(), and main().
|
static |
Definition at line 54 of file mitkDiffusionPropertyHelper.h.
|
static |
|
static |
Definition at line 52 of file mitkDiffusionPropertyHelper.h.
Referenced by mitk::RegistrationWrapper::ApplyTransformationToImage(), mitk::DiffusionImageTransformedCreationFilter< TTransformType >::GenerateData(), mitk::DWIHeadMotionCorrectionFilter::GenerateData(), mitk::DiffusionImageCreationFilter::GenerateData(), GetB_Value(), mitk::DiffusionImageNiftiReaderService::InternalRead(), mitk::DiffusionImageNrrdReaderService::InternalRead(), mitk::DiffusionDICOMFileReader::LoadSingleOutputImage(), main(), ResampleDWIbySpacing(), and mitk::RawShModel< ScalarType >::SampleKernels().