ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::TrxGroupTdiMapper Class Reference

#include <itkTrxGroupTdiMapper.h>

Detailed Description

Maps a selection of TRX streamlines to a 3D Track Density Image (TDI).

Streamlines are selected via a named group (SetGroupName()), an explicit index list (SetSelectedStreamlineIds()), or the intersection of both. At least one selector must be set before calling Update().

Coordinate mapping uses the caller-provided reference NIfTI geometry (SetReferenceImageFileName()) exclusively; the TRX header geometry is ignored. Streamline coordinates are consumed in native TRX RAS space for efficiency, with the RAS-to-voxel transform computed internally from the reference image.

Voxel statistics

Each voxel touched by a streamline is counted at most once per streamline (NearestUniqueVoxelPerStreamline mode). Two statistics are available:

  • Sum (default): the value accumulated per voxel equals the sum of per-streamline weights (1.0 unless a DPS weight field is set).
  • Mean: divides the summed value by the number of distinct streamlines that contributed to each voxel.

Optional DPS weight field

Set Options::weightField to the name of a 1D DPS field to use per-streamline weights instead of the default weight of 1. Streamlines with non-finite or non-positive weights are skipped.

Definition at line 64 of file itkTrxGroupTdiMapper.h.

+ Inheritance diagram for itk::TrxGroupTdiMapper:
+ Collaboration diagram for itk::TrxGroupTdiMapper:

Classes

struct  Options
 

Public Types

using ConstPointer = SmartPointer<const Self>
 
enum class  MappingMode { NearestUniqueVoxelPerStreamline }
 
using OutputImageType = Image<float, 3>
 
using Pointer = SmartPointer<Self>
 
using Self = TrxGroupTdiMapper
 
using Superclass = Object
 
enum class  VoxelStatistic {
  Sum ,
  Mean
}
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer<const Self>
 
using Pointer = SmartPointer<Self>
 
using Self = LightObject
 

Public Member Functions

virtual::itk::LightObject::Pointer CreateAnother () const
 
const std::string & GetGroupName () const
 
TrxStreamlineData::ConstPointer GetInput () const
 
const std::string & GetInputFileName () const
 
virtual const char * GetNameOfClass () const
 
const Options & GetOptions () const
 
OutputImageType * GetOutput ()
 
const OutputImageType * GetOutput () const
 
const std::string & GetReferenceImageFileName () const
 
const std::vector< uint32_t > & GetSelectedStreamlineIds () const
 
void SetGroupName (const std::string &groupName)
 
void SetInput (TrxStreamlineData::ConstPointer input)
 
void SetInputFileName (const std::string &filename)
 
void SetOptions (const Options &options)
 
void SetReferenceImageFileName (const std::string &filename)
 
void SetSelectedStreamlineIds (const std::vector< uint32_t > &ids)
 
void Update ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
Command * GetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionary & GetMetaDataDictionary ()
 
const MetaDataDictionary & GetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStamp & GetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static OutputImageType::Pointer Compute (const std::string &inputTrxFileName, const std::string &groupName, const std::string &referenceImageFileName)
 
static OutputImageType::Pointer Compute (const std::string &inputTrxFileName, const std::string &groupName, const std::string &referenceImageFileName, const Options &options)
 
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 
 TrxGroupTdiMapper ()=default
 
 ~TrxGroupTdiMapper () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Private Attributes

std::string m_GroupName
 
bool m_HasSelectedStreamlineIds { false }
 
TrxStreamlineData::ConstPointer m_Input
 
std::string m_InputFileName
 
Options m_Options
 
OutputImageType::Pointer m_Output
 
std::string m_ReferenceImageFileName
 
std::vector< uint32_t > m_SelectedStreamlineIds
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Member Typedef Documentation

◆ ConstPointer

◆ OutputImageType

Definition at line 77 of file itkTrxGroupTdiMapper.h.

◆ Pointer

◆ Self

◆ Superclass

Member Enumeration Documentation

◆ MappingMode

Enumerator
NearestUniqueVoxelPerStreamline 

Definition at line 85 of file itkTrxGroupTdiMapper.h.

◆ VoxelStatistic

Enumerator
Sum 
Mean 

Definition at line 79 of file itkTrxGroupTdiMapper.h.

Constructor & Destructor Documentation

◆ TrxGroupTdiMapper()

itk::TrxGroupTdiMapper::TrxGroupTdiMapper ( )
protecteddefault

Referenced by GetNameOfClass().

◆ ~TrxGroupTdiMapper()

itk::TrxGroupTdiMapper::~TrxGroupTdiMapper ( )
overrideprotecteddefault

Member Function Documentation

◆ Compute() [1/2]

static OutputImageType::Pointer itk::TrxGroupTdiMapper::Compute ( const std::string & inputTrxFileName,
const std::string & groupName,
const std::string & referenceImageFileName )
static

Convenience helper for default usage.

◆ Compute() [2/2]

static OutputImageType::Pointer itk::TrxGroupTdiMapper::Compute ( const std::string & inputTrxFileName,
const std::string & groupName,
const std::string & referenceImageFileName,
const Options & options )
static

Convenience helper with custom options.

◆ CreateAnother()

virtual::itk::LightObject::Pointer itk::TrxGroupTdiMapper::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ GetGroupName()

const std::string & itk::TrxGroupTdiMapper::GetGroupName ( ) const

◆ GetInput()

TrxStreamlineData::ConstPointer itk::TrxGroupTdiMapper::GetInput ( ) const

◆ GetInputFileName()

const std::string & itk::TrxGroupTdiMapper::GetInputFileName ( ) const

◆ GetNameOfClass()

virtual const char * itk::TrxGroupTdiMapper::GetNameOfClass ( ) const
virtual
See also
LightObject::GetNameOfClass()

Reimplemented from itk::Object.

References TrxGroupTdiMapper().

◆ GetOptions()

const Options & itk::TrxGroupTdiMapper::GetOptions ( ) const

◆ GetOutput() [1/2]

OutputImageType * itk::TrxGroupTdiMapper::GetOutput ( )

◆ GetOutput() [2/2]

const OutputImageType * itk::TrxGroupTdiMapper::GetOutput ( ) const

◆ GetReferenceImageFileName()

const std::string & itk::TrxGroupTdiMapper::GetReferenceImageFileName ( ) const

◆ GetSelectedStreamlineIds()

const std::vector< uint32_t > & itk::TrxGroupTdiMapper::GetSelectedStreamlineIds ( ) const

◆ New()

static Pointer itk::TrxGroupTdiMapper::New ( )
static

◆ PrintSelf()

void itk::TrxGroupTdiMapper::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::Object.

◆ SetGroupName()

void itk::TrxGroupTdiMapper::SetGroupName ( const std::string & groupName)

◆ SetInput()

void itk::TrxGroupTdiMapper::SetInput ( TrxStreamlineData::ConstPointer input)

◆ SetInputFileName()

void itk::TrxGroupTdiMapper::SetInputFileName ( const std::string & filename)

◆ SetOptions()

void itk::TrxGroupTdiMapper::SetOptions ( const Options & options)

◆ SetReferenceImageFileName()

void itk::TrxGroupTdiMapper::SetReferenceImageFileName ( const std::string & filename)

◆ SetSelectedStreamlineIds()

void itk::TrxGroupTdiMapper::SetSelectedStreamlineIds ( const std::vector< uint32_t > & ids)

Optional explicit streamline selection (indices in input space).

◆ Update()

void itk::TrxGroupTdiMapper::Update ( )

Build the output image.

Member Data Documentation

◆ m_GroupName

std::string itk::TrxGroupTdiMapper::m_GroupName
private

Definition at line 172 of file itkTrxGroupTdiMapper.h.

◆ m_HasSelectedStreamlineIds

bool itk::TrxGroupTdiMapper::m_HasSelectedStreamlineIds { false }
private

Definition at line 175 of file itkTrxGroupTdiMapper.h.

◆ m_Input

TrxStreamlineData::ConstPointer itk::TrxGroupTdiMapper::m_Input
private

Definition at line 170 of file itkTrxGroupTdiMapper.h.

◆ m_InputFileName

std::string itk::TrxGroupTdiMapper::m_InputFileName
private

Definition at line 171 of file itkTrxGroupTdiMapper.h.

◆ m_Options

Options itk::TrxGroupTdiMapper::m_Options
private

Definition at line 174 of file itkTrxGroupTdiMapper.h.

◆ m_Output

OutputImageType::Pointer itk::TrxGroupTdiMapper::m_Output
private

Definition at line 177 of file itkTrxGroupTdiMapper.h.

◆ m_ReferenceImageFileName

std::string itk::TrxGroupTdiMapper::m_ReferenceImageFileName
private

Definition at line 173 of file itkTrxGroupTdiMapper.h.

◆ m_SelectedStreamlineIds

std::vector<uint32_t> itk::TrxGroupTdiMapper::m_SelectedStreamlineIds
private

Definition at line 176 of file itkTrxGroupTdiMapper.h.


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