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

Base Class for Fiber Bundles;. More...

#include <mitkFiberBundle.h>

Inheritance diagram for mitk::FiberBundle:
Collaboration diagram for mitk::FiberBundle:

Public Types

typedef itk::Image< unsigned char, 3 > ItkUcharImgType
 
- Public Types inherited from mitk::BaseData
typedef BaseData Self
 
typedef itk::DataObject Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual void UpdateOutputInformation () override
 
virtual void SetRequestedRegionToLargestPossibleRegion () override
 Set the RequestedRegion to the LargestPossibleRegion. More...
 
virtual bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 Determine whether the RequestedRegion is outside of the BufferedRegion. More...
 
virtual bool VerifyRequestedRegion () override
 Verify that the RequestedRegion is within the LargestPossibleRegion. More...
 
virtual void SetRequestedRegion (const itk::DataObject *) override
 Set the requested region from this data object to match the requested region of the data object passed in as a parameter. More...
 
 mitkClassMacro (FiberBundle, BaseData) static Pointer New()
 
Pointer Clone () const
 
 mitkNewMacro1Param (Self, vtkSmartPointer< vtkPolyData >) void ColorFibersByCurvature(bool minMaxNorm
 
void ColorFibersByScalarMap (mitk::Image::Pointer, bool opacity)
 
template<typename TPixel >
void ColorFibersByScalarMap (const mitk::PixelType pixelType, mitk::Image::Pointer, bool opacity)
 
void ColorFibersByOrientation ()
 
void SetFiberOpacity (vtkDoubleArray *FAValArray)
 
void ResetFiberOpacity ()
 
void SetFiberColors (vtkSmartPointer< vtkUnsignedCharArray > fiberColors)
 
void SetFiberColors (float r, float g, float b, float alpha=255)
 
vtkSmartPointer< vtkUnsignedCharArray > GetFiberColors () const
 
void Compress (float error=0.0)
 
void ResampleSpline (float pointDistance=1)
 
void ResampleSpline (float pointDistance, double tension, double continuity, double bias)
 
bool RemoveShortFibers (float lengthInMM)
 
bool RemoveLongFibers (float lengthInMM)
 
bool ApplyCurvatureThreshold (float minRadius, bool deleteFibers)
 
void MirrorFibers (unsigned int axis)
 
void RotateAroundAxis (double x, double y, double z)
 
void TranslateFibers (double x, double y, double z)
 
void ScaleFibers (double x, double y, double z, bool subtractCenter=true)
 
void TransformFibers (double rx, double ry, double rz, double tx, double ty, double tz)
 
void RemoveDir (vnl_vector_fixed< double, 3 > dir, double threshold)
 
itk::Point< float, 3 > TransformPoint (vnl_vector_fixed< double, 3 > point, double rx, double ry, double rz, double tx, double ty, double tz)
 
itk::Matrix< double, 3, 3 > TransformMatrix (itk::Matrix< double, 3, 3 > m, double rx, double ry, double rz)
 
FiberBundle::Pointer AddBundle (FiberBundle *fib)
 
FiberBundle::Pointer SubtractBundle (FiberBundle *fib)
 
FiberBundle::Pointer ExtractFiberSubset (DataNode *roi, DataStorage *storage)
 
std::vector< long > ExtractFiberIdSubset (DataNode *roi, DataStorage *storage)
 
FiberBundle::Pointer ExtractFiberSubset (ItkUcharImgType *mask, bool anyPoint, bool invert=false, bool bothEnds=true)
 
FiberBundle::Pointer RemoveFibersOutside (ItkUcharImgType *mask, bool invert=false)
 
vtkSmartPointer< vtkPolyData > GeneratePolyDataByIds (std::vector< long >)
 
void GenerateFiberIds ()
 
vtkSmartPointer< vtkFloatArray > GetFiberWeights () const
 
float GetFiberWeight (unsigned int fiber)
 
void SetFiberWeights (float newWeight)
 
void SetFiberWeight (unsigned int fiber, float weight)
 
void SetFiberWeights (vtkSmartPointer< vtkFloatArray > weights)
 
void SetFiberPolyData (vtkSmartPointer< vtkPolyData >, bool updateGeometry=true)
 
vtkSmartPointer< vtkPolyData > GetFiberPolyData () const
 
virtual int GetNumFibers ()
 
int GetNumFibers () const
 
virtual float GetMinFiberLength ()
 
virtual float GetMaxFiberLength ()
 
virtual float GetMeanFiberLength ()
 
virtual float GetMedianFiberLength ()
 
virtual float GetLengthStDev ()
 
virtual itk::TimeStamp GetUpdateTime2D ()
 
virtual itk::TimeStamp GetUpdateTime3D ()
 
void RequestUpdate2D ()
 
void RequestUpdate3D ()
 
void RequestUpdate ()
 
unsigned long GetNumberOfPoints ()
 
mitk::FiberBundle::Pointer GetDeepCopy ()
 
bool Equals (FiberBundle *fib, double eps=0.0001)
 
virtual void SetReferenceGeometry (mitk::BaseGeometry::Pointer _arg)
 
virtual mitk::BaseGeometry::Pointer GetReferenceGeometry () const
 
- Public Member Functions inherited from mitk::BaseData
virtual std::vector< std::string > GetClassHierarchy () const
 
virtual const char * GetClassName () const
 
const mitk::TimeGeometryGetTimeGeometry () const
 Return the TimeGeometry of the data as const pointer. More...
 
const mitk::TimeGeometryGetTimeSlicedGeometry () const
 Return the TimeGeometry of the data as const pointer. More...
 
mitk::TimeGeometryGetTimeGeometry ()
 Return the TimeGeometry of the data as pointer. More...
 
const mitk::TimeGeometryGetUpdatedTimeGeometry ()
 Return the TimeGeometry of the data. More...
 
const mitk::TimeGeometryGetUpdatedTimeSliceGeometry ()
 Return the TimeGeometry of the data. More...
 
virtual void Expand (unsigned int timeSteps)
 Expands the TimeGeometry to a number of TimeSteps. More...
 
const mitk::BaseGeometryGetUpdatedGeometry (int t=0)
 Return the BaseGeometry of the data at time t. More...
 
mitk::BaseGeometryGetGeometry (int t=0) const
 Return the geometry, which is a TimeGeometry, of the data as non-const pointer. More...
 
void UpdateOutputInformation () override
 Update the information for this BaseData (the geometry in particular) so that it can be used as an output of a BaseProcess. More...
 
void CopyInformation (const itk::DataObject *data) override
 Copy information from the specified data set. More...
 
virtual bool IsInitialized () const
 Check whether the data has been initialized, i.e., at least the Geometry and other header data has been set. More...
 
virtual void Clear ()
 Calls ClearData() and InitializeEmpty();. More...
 
virtual bool IsEmptyTimeStep (unsigned int t) const
 Check whether object contains data (at a specified time), e.g., a set of points may be empty. More...
 
virtual bool IsEmpty () const
 Check whether object contains data (at least at one point in time), e.g., a set of points may be empty. More...
 
void ExecuteOperation (Operation *operation) override
 overwrite if the Data can be called by an Interactor (StateMachine). More...
 
virtual void SetGeometry (BaseGeometry *aGeometry3D)
 Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry which saves the given BaseGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More...
 
virtual void SetTimeGeometry (TimeGeometry *geometry)
 Set the TimeGeometry of the data, which will be referenced (not copied!). More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D)
 Set a clone of the provided TimeGeometry as TimeGeometry of the data. Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More...
 
virtual void SetClonedTimeGeometry (const TimeGeometry *geometry)
 Set a clone of the provided TimeGeometry as TimeGeometry of the data. More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time)
 Set a clone of the provided geometry as BaseGeometry of a given time step. More...
 
mitk::PropertyList::Pointer GetPropertyList () const
 Get the data's property list. More...
 
void SetPropertyList (PropertyList *propertyList)
 Set the data's property list. More...
 
mitk::BaseProperty::Pointer GetProperty (const char *propertyKey) const
 Get the property (instance of BaseProperty) with key propertyKey from the PropertyList, and set it to this, respectively;. More...
 
void SetProperty (const char *propertyKey, BaseProperty *property)
 
virtual void SetOrigin (const Point3D &origin)
 Convenience method for setting the origin of the BaseGeometry instances of all time steps. More...
 
itk::SmartPointer< mitk::BaseDataSourceGetSource () const
 Get the process object that generated this data object. More...
 
unsigned int GetTimeSteps () const
 Get the number of time steps from the TimeGeometry As the base data has not a data vector given by itself, the number of time steps is defined over the time sliced geometry. In sub classes, a better implementation could be over the length of the data vector. More...
 
virtual unsigned long GetMTime () const override
 Get the modified time of the last change of the contents this data object or its geometry. More...
 
virtual void Graft (const DataObject *) override
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 

Static Public Attributes

static const char * FIBER_ID_ARRAY
 

Protected Member Functions

 FiberBundle (vtkPolyData *fiberPolyData=nullptr)
 
virtual ~FiberBundle ()
 
itk::Point< float, 3 > GetItkPoint (double point[3])
 
void UpdateFiberGeometry ()
 
- Protected Member Functions inherited from mitk::BaseData
 BaseData ()
 
 BaseData (const BaseData &other)
 
 ~BaseData ()
 
virtual void InitializeTimeGeometry (unsigned int timeSteps=1)
 Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More...
 
virtual void InitializeTimeSlicedGeometry (unsigned int timeSteps=1)
 Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More...
 
virtual void ClearData ()
 reset to non-initialized state, release memory More...
 
virtual void InitializeEmpty ()
 Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More...
 
virtual void PrintSelf (std::ostream &os, itk::Indent indent) const override
 

Additional Inherited Members

- Static Public Member Functions inherited from mitk::BaseData
static const char * GetStaticNameOfClass ()
 
- Protected Attributes inherited from mitk::BaseData
bool m_LastRequestedRegionWasOutsideOfTheBufferedRegion
 
unsigned int m_SourceOutputIndexDuplicate
 
bool m_Initialized
 

Detailed Description

Base Class for Fiber Bundles;.

Definition at line 44 of file mitkFiberBundle.h.

Member Typedef Documentation

Definition at line 48 of file mitkFiberBundle.h.

Constructor & Destructor Documentation

mitk::FiberBundle::FiberBundle ( vtkPolyData *  fiberPolyData = nullptr)
protected
mitk::FiberBundle::~FiberBundle ( )
protectedvirtual

Definition at line 71 of file mitkFiberBundle.cpp.

Member Function Documentation

mitk::FiberBundle::Pointer mitk::FiberBundle::AddBundle ( mitk::FiberBundle fib)
bool mitk::FiberBundle::ApplyCurvatureThreshold ( float  minRadius,
bool  deleteFibers 
)

Definition at line 1583 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

Pointer mitk::FiberBundle::Clone ( ) const
void mitk::FiberBundle::ColorFibersByOrientation ( )

Definition at line 297 of file mitkFiberBundle.cpp.

References MITK_DEBUG, and mitk::New().

Referenced by FiberBundle().

void mitk::FiberBundle::ColorFibersByScalarMap ( mitk::Image::Pointer  FAimage,
bool  opacity 
)

Definition at line 557 of file mitkFiberBundle.cpp.

References mitkPixelTypeMultiplex2.

template<typename TPixel >
void mitk::FiberBundle::ColorFibersByScalarMap ( const mitk::PixelType  pixelType,
mitk::Image::Pointer  image,
bool  opacity 
)
void mitk::FiberBundle::Compress ( float  error = 0.0)

Definition at line 1843 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

bool mitk::FiberBundle::Equals ( mitk::FiberBundle fib,
double  eps = 0.0001 
)

Definition at line 1954 of file mitkFiberBundle.cpp.

References GetFiberPolyData(), GetNumFibers(), and MITK_INFO.

std::vector< long > mitk::FiberBundle::ExtractFiberIdSubset ( DataNode roi,
DataStorage storage 
)
mitk::FiberBundle::Pointer mitk::FiberBundle::ExtractFiberSubset ( DataNode roi,
DataStorage storage 
)
mitk::FiberBundle::Pointer mitk::FiberBundle::ExtractFiberSubset ( ItkUcharImgType mask,
bool  anyPoint,
bool  invert = false,
bool  bothEnds = true 
)

Definition at line 645 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

void mitk::FiberBundle::GenerateFiberIds ( )

Definition at line 628 of file mitkFiberBundle.cpp.

References mitk::New().

Referenced by FiberBundle().

vtkSmartPointer< vtkPolyData > mitk::FiberBundle::GeneratePolyDataByIds ( std::vector< long >  fiberIds)

Definition at line 84 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

mitk::FiberBundle::Pointer mitk::FiberBundle::GetDeepCopy ( )

Definition at line 76 of file mitkFiberBundle.cpp.

References mitk::New().

vtkSmartPointer<vtkUnsignedCharArray> mitk::FiberBundle::GetFiberColors ( ) const
inline
vtkSmartPointer< vtkPolyData > mitk::FiberBundle::GetFiberPolyData ( ) const
float mitk::FiberBundle::GetFiberWeight ( unsigned int  fiber)

Definition at line 1169 of file mitkFiberBundle.cpp.

Referenced by AddBundle().

vtkSmartPointer<vtkFloatArray> mitk::FiberBundle::GetFiberWeights ( ) const
inline

Definition at line 109 of file mitkFiberBundle.h.

itk::Point< float, 3 > mitk::FiberBundle::GetItkPoint ( double  point[3])
protected

Definition at line 260 of file mitkFiberBundle.cpp.

virtual float mitk::FiberBundle::GetLengthStDev ( )
virtual
virtual float mitk::FiberBundle::GetMaxFiberLength ( )
virtual
virtual float mitk::FiberBundle::GetMeanFiberLength ( )
virtual
virtual float mitk::FiberBundle::GetMedianFiberLength ( )
virtual
virtual float mitk::FiberBundle::GetMinFiberLength ( )
virtual
unsigned long mitk::FiberBundle::GetNumberOfPoints ( )

Definition at line 1832 of file mitkFiberBundle.cpp.

virtual int mitk::FiberBundle::GetNumFibers ( )
virtual
int mitk::FiberBundle::GetNumFibers ( ) const
inline

Definition at line 118 of file mitkFiberBundle.h.

virtual mitk::BaseGeometry::Pointer mitk::FiberBundle::GetReferenceGeometry ( ) const
virtual
virtual itk::TimeStamp mitk::FiberBundle::GetUpdateTime2D ( )
virtual
virtual itk::TimeStamp mitk::FiberBundle::GetUpdateTime3D ( )
virtual
void mitk::FiberBundle::MirrorFibers ( unsigned int  axis)

Definition at line 1485 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

mitk::FiberBundle::mitkClassMacro ( FiberBundle  ,
BaseData   
)
mitk::FiberBundle::mitkNewMacro1Param ( Self  ,
vtkSmartPointer< vtkPolyData >   
)
void mitk::FiberBundle::RemoveDir ( vnl_vector_fixed< double, 3 >  dir,
double  threshold 
)

Definition at line 1520 of file mitkFiberBundle.cpp.

References mitk::New().

mitk::FiberBundle::Pointer mitk::FiberBundle::RemoveFibersOutside ( ItkUcharImgType mask,
bool  invert = false 
)

Definition at line 815 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

bool mitk::FiberBundle::RemoveLongFibers ( float  lengthInMM)

Definition at line 1715 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

bool mitk::FiberBundle::RemoveShortFibers ( float  lengthInMM)

Definition at line 1663 of file mitkFiberBundle.cpp.

References min(), MITK_INFO, MITK_WARN, and mitk::New().

bool mitk::FiberBundle::RequestedRegionIsOutsideOfTheBufferedRegion ( )
overridevirtual

Determine whether the RequestedRegion is outside of the BufferedRegion.

This method returns true if the RequestedRegion is outside the BufferedRegion (true if at least one pixel is outside). This is used by the pipeline mechanism to determine whether a filter needs to re-execute in order to satisfy the current request. If the current RequestedRegion is already inside the BufferedRegion from the previous execution (and the current filter is up to date), then a given filter does not need to re-execute

Implements mitk::BaseData.

Definition at line 2012 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::RequestUpdate ( )
inline

Definition at line 128 of file mitkFiberBundle.h.

void mitk::FiberBundle::RequestUpdate2D ( )
inline

Definition at line 126 of file mitkFiberBundle.h.

Referenced by mitk::FiberBundleMapper2D::Update().

void mitk::FiberBundle::RequestUpdate3D ( )
inline
void mitk::FiberBundle::ResampleSpline ( float  pointDistance = 1)

Definition at line 1827 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::ResampleSpline ( float  pointDistance,
double  tension,
double  continuity,
double  bias 
)

Definition at line 1758 of file mitkFiberBundle.cpp.

References MITK_INFO, and mitk::New().

void mitk::FiberBundle::ResetFiberOpacity ( )

Definition at line 549 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::RotateAroundAxis ( double  x,
double  y,
double  z 
)

Definition at line 1350 of file mitkFiberBundle.cpp.

References M_PI, and mitk::New().

void mitk::FiberBundle::ScaleFibers ( double  x,
double  y,
double  z,
bool  subtractCenter = true 
)

Definition at line 1410 of file mitkFiberBundle.cpp.

References mitk::BaseGeometry::GetCenter(), MITK_INFO, and mitk::New().

void mitk::FiberBundle::SetFiberColors ( vtkSmartPointer< vtkUnsignedCharArray >  fiberColors)

Definition at line 1199 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::SetFiberColors ( float  r,
float  g,
float  b,
float  alpha = 255 
)

Definition at line 608 of file mitkFiberBundle.cpp.

References mitk::New().

void mitk::FiberBundle::SetFiberOpacity ( vtkDoubleArray *  FAValArray)

Definition at line 537 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::SetFiberPolyData ( vtkSmartPointer< vtkPolyData >  fiberPD,
bool  updateGeometry = true 
)

Definition at line 272 of file mitkFiberBundle.cpp.

References mitk::New().

Referenced by TrackVisFiberReader::read().

void mitk::FiberBundle::SetFiberWeight ( unsigned int  fiber,
float  weight 
)

Definition at line 1194 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::SetFiberWeights ( float  newWeight)

Definition at line 1174 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::SetFiberWeights ( vtkSmartPointer< vtkFloatArray >  weights)

Definition at line 1180 of file mitkFiberBundle.cpp.

References MITK_INFO.

virtual void mitk::FiberBundle::SetReferenceGeometry ( mitk::BaseGeometry::Pointer  _arg)
virtual
void mitk::FiberBundle::SetRequestedRegion ( const itk::DataObject *  data)
overridevirtual

Set the requested region from this data object to match the requested region of the data object passed in as a parameter.

This method is implemented in the concrete subclasses of BaseData.

Implements mitk::BaseData.

Definition at line 2020 of file mitkFiberBundle.cpp.

void mitk::FiberBundle::SetRequestedRegionToLargestPossibleRegion ( )
overridevirtual

Set the RequestedRegion to the LargestPossibleRegion.

This forces a filter to produce all of the output in one execution (i.e. not streaming) on the next call to Update().

Implements mitk::BaseData.

Definition at line 2008 of file mitkFiberBundle.cpp.

mitk::FiberBundle::Pointer mitk::FiberBundle::SubtractBundle ( mitk::FiberBundle fib)

Definition at line 189 of file mitkFiberBundle.cpp.

References mitk::eps, GetFiberPolyData(), GetNumFibers(), MITK_INFO, and mitk::New().

void mitk::FiberBundle::TransformFibers ( double  rx,
double  ry,
double  rz,
double  tx,
double  ty,
double  tz 
)

Definition at line 1288 of file mitkFiberBundle.cpp.

References M_PI, and mitk::New().

itk::Matrix< double, 3, 3 > mitk::FiberBundle::TransformMatrix ( itk::Matrix< double, 3, 3 >  m,
double  rx,
double  ry,
double  rz 
)

Definition at line 1217 of file mitkFiberBundle.cpp.

References M_PI.

itk::Point< float, 3 > mitk::FiberBundle::TransformPoint ( vnl_vector_fixed< double, 3 >  point,
double  rx,
double  ry,
double  rz,
double  tx,
double  ty,
double  tz 
)

Definition at line 1248 of file mitkFiberBundle.cpp.

References M_PI.

void mitk::FiberBundle::TranslateFibers ( double  x,
double  y,
double  z 
)

Definition at line 1455 of file mitkFiberBundle.cpp.

References mitk::New().

void mitk::FiberBundle::UpdateFiberGeometry ( )
protected

Definition at line 1077 of file mitkFiberBundle.cpp.

References mitk::New(), and mitk::Geometry3D::New().

Referenced by FiberBundle().

void mitk::FiberBundle::UpdateOutputInformation ( )
overridevirtual

Definition at line 2004 of file mitkFiberBundle.cpp.

bool mitk::FiberBundle::VerifyRequestedRegion ( )
overridevirtual

Verify that the RequestedRegion is within the LargestPossibleRegion.

If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possibly satisfy the request. This method returns true if the request can be satisfied (even if it will be necessary to process the entire LargestPossibleRegion) and returns false otherwise. This method is used by PropagateRequestedRegion(). PropagateRequestedRegion() throws a InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion.

Implements mitk::BaseData.

Definition at line 2016 of file mitkFiberBundle.cpp.

Member Data Documentation

const char * mitk::FiberBundle::FIBER_ID_ARRAY
static

Definition at line 51 of file mitkFiberBundle.h.


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