#include <itkTrxGroupTdiMapper.h>
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.
Each voxel touched by a streamline is counted at most once per streamline (NearestUniqueVoxelPerStreamline mode). Two statistics are available:
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 {} |
| using itk::TrxGroupTdiMapper::ConstPointer = SmartPointer<const Self> |
Definition at line 72 of file itkTrxGroupTdiMapper.h.
| using itk::TrxGroupTdiMapper::OutputImageType = Image<float, 3> |
Definition at line 77 of file itkTrxGroupTdiMapper.h.
Definition at line 71 of file itkTrxGroupTdiMapper.h.
Definition at line 69 of file itkTrxGroupTdiMapper.h.
Definition at line 70 of file itkTrxGroupTdiMapper.h.
|
strong |
| Enumerator | |
|---|---|
| NearestUniqueVoxelPerStreamline | |
Definition at line 85 of file itkTrxGroupTdiMapper.h.
|
strong |
| Enumerator | |
|---|---|
| Sum | |
| Mean | |
Definition at line 79 of file itkTrxGroupTdiMapper.h.
|
protecteddefault |
Referenced by GetNameOfClass().
|
overrideprotecteddefault |
|
static |
Convenience helper for default usage.
|
static |
Convenience helper with custom options.
|
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.
| const std::string & itk::TrxGroupTdiMapper::GetGroupName | ( | ) | const |
| TrxStreamlineData::ConstPointer itk::TrxGroupTdiMapper::GetInput | ( | ) | const |
| const std::string & itk::TrxGroupTdiMapper::GetInputFileName | ( | ) | const |
|
virtual |
Reimplemented from itk::Object.
References TrxGroupTdiMapper().
| const Options & itk::TrxGroupTdiMapper::GetOptions | ( | ) | const |
| OutputImageType * itk::TrxGroupTdiMapper::GetOutput | ( | ) |
| const OutputImageType * itk::TrxGroupTdiMapper::GetOutput | ( | ) | const |
| const std::string & itk::TrxGroupTdiMapper::GetReferenceImageFileName | ( | ) | const |
| const std::vector< uint32_t > & itk::TrxGroupTdiMapper::GetSelectedStreamlineIds | ( | ) | const |
|
static |
|
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.
| void itk::TrxGroupTdiMapper::SetGroupName | ( | const std::string & | groupName | ) |
| void itk::TrxGroupTdiMapper::SetInput | ( | TrxStreamlineData::ConstPointer | input | ) |
| void itk::TrxGroupTdiMapper::SetInputFileName | ( | const std::string & | filename | ) |
| void itk::TrxGroupTdiMapper::SetOptions | ( | const Options & | options | ) |
| void itk::TrxGroupTdiMapper::SetReferenceImageFileName | ( | const std::string & | filename | ) |
| void itk::TrxGroupTdiMapper::SetSelectedStreamlineIds | ( | const std::vector< uint32_t > & | ids | ) |
Optional explicit streamline selection (indices in input space).
| void itk::TrxGroupTdiMapper::Update | ( | ) |
Build the output image.
|
private |
Definition at line 172 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 175 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 170 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 171 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 174 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 177 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 173 of file itkTrxGroupTdiMapper.h.
|
private |
Definition at line 176 of file itkTrxGroupTdiMapper.h.