go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itk::ImpactModelConfiguration Struct Reference

#include <itkImpactModelConfiguration.h>

Detailed Description

Configuration structure for a TorchScript model used to extract semantic features.

Contains path to the model, number of input channels, patch size and voxel size, along with internal buffers (e.g., precomputed patch index and center extraction index). If the mode is not static, the patchIndex is generated here to optimize runtime computation.

Definition at line 64 of file itkImpactModelConfiguration.h.

Public Member Functions

std::vector< torch::jit::IValue > forward (torch::Tensor inputPatch) const
const std::vector< std::vector< torch::indexing::TensorIndex > > & GetCentersIndexLayers () const
const torch::ScalarType & GetDataType () const
unsigned int GetDimension () const
const std::vector< bool > & GetLayersMask () const
const std::string & GetModelPath () const
unsigned int GetNumberOfChannels () const
const std::vector< std::vector< float > > & GetPatchIndex () const
const std::vector< int64_t > & GetPatchSize () const
const std::vector< float > & GetVoxelSize () const
 ImpactModelConfiguration (const ImpactModelConfiguration &)=delete
 ImpactModelConfiguration (ImpactModelConfiguration &&)=default
 ImpactModelConfiguration (std::string modelPath, unsigned int dimension, unsigned int numberOfChannels, std::vector< unsigned int > patchSize, std::vector< float > voxelSize, std::vector< bool > layersMask, bool isStatic, bool useMixedPrecision)
ImpactModelConfigurationoperator= (const ImpactModelConfiguration &)=delete
ImpactModelConfigurationoperator= (ImpactModelConfiguration &&)=default
bool operator== (const ImpactModelConfiguration &rhs) const
void SetCentersIndexLayers (std::vector< std::vector< torch::indexing::TensorIndex > > &centersIndexLayers)
template<class TImage>
void setup (typename TImage::ConstPointer image)
void to (torch::Device device) const
 ~ImpactModelConfiguration ()=default

Private Attributes

std::vector< std::vector< torch::indexing::TensorIndex > > m_CentersIndexLayers
torch::ScalarType m_DataType
unsigned int m_Dimension
torch::Tensor m_imageDirectionTensor
torch::Tensor m_imageStatsTensor
std::vector< boolm_LayersMask
std::shared_ptr< torch::jit::script::Module > m_Model
std::string m_ModelPath
std::vcl_size_t m_nArgs
torch::Tensor m_nLayers
unsigned int m_NumberOfChannels
std::vector< std::vector< float > > m_PatchIndex
std::vector< int64_t > m_PatchSize
std::vector< floatm_VoxelSize

Friends

std::ostream & operator<< (std::ostream &os, const ImpactModelConfiguration &config)

Constructor & Destructor Documentation

◆ ImpactModelConfiguration() [1/3]

itk::ImpactModelConfiguration::ImpactModelConfiguration ( std::string modelPath,
unsigned int dimension,
unsigned int numberOfChannels,
std::vector< unsigned int > patchSize,
std::vector< float > voxelSize,
std::vector< bool > layersMask,
bool isStatic,
bool useMixedPrecision )
inline

Definition at line 67 of file itkImpactModelConfiguration.h.

◆ ImpactModelConfiguration() [2/3]

itk::ImpactModelConfiguration::ImpactModelConfiguration ( const ImpactModelConfiguration & )
delete

◆ ImpactModelConfiguration() [3/3]

itk::ImpactModelConfiguration::ImpactModelConfiguration ( ImpactModelConfiguration && )
default

◆ ~ImpactModelConfiguration()

itk::ImpactModelConfiguration::~ImpactModelConfiguration ( )
default

Member Function Documentation

◆ forward()

std::vector< torch::jit::IValue > itk::ImpactModelConfiguration::forward ( torch::Tensor inputPatch) const
inline

Definition at line 229 of file itkImpactModelConfiguration.h.

◆ GetCentersIndexLayers()

const std::vector< std::vector< torch::indexing::TensorIndex > > & itk::ImpactModelConfiguration::GetCentersIndexLayers ( ) const
inline

Definition at line 256 of file itkImpactModelConfiguration.h.

◆ GetDataType()

const torch::ScalarType & itk::ImpactModelConfiguration::GetDataType ( ) const
inline

Definition at line 161 of file itkImpactModelConfiguration.h.

◆ GetDimension()

unsigned int itk::ImpactModelConfiguration::GetDimension ( ) const
inline

Definition at line 167 of file itkImpactModelConfiguration.h.

◆ GetLayersMask()

const std::vector< bool > & itk::ImpactModelConfiguration::GetLayersMask ( ) const
inline

Definition at line 187 of file itkImpactModelConfiguration.h.

◆ GetModelPath()

const std::string & itk::ImpactModelConfiguration::GetModelPath ( ) const
inline

Definition at line 155 of file itkImpactModelConfiguration.h.

◆ GetNumberOfChannels()

unsigned int itk::ImpactModelConfiguration::GetNumberOfChannels ( ) const
inline

Definition at line 172 of file itkImpactModelConfiguration.h.

◆ GetPatchIndex()

const std::vector< std::vector< float > > & itk::ImpactModelConfiguration::GetPatchIndex ( ) const
inline

Definition at line 251 of file itkImpactModelConfiguration.h.

◆ GetPatchSize()

const std::vector< int64_t > & itk::ImpactModelConfiguration::GetPatchSize ( ) const
inline

Definition at line 177 of file itkImpactModelConfiguration.h.

◆ GetVoxelSize()

const std::vector< float > & itk::ImpactModelConfiguration::GetVoxelSize ( ) const
inline

Definition at line 182 of file itkImpactModelConfiguration.h.

◆ operator=() [1/2]

ImpactModelConfiguration & itk::ImpactModelConfiguration::operator= ( const ImpactModelConfiguration & )
delete

◆ operator=() [2/2]

ImpactModelConfiguration & itk::ImpactModelConfiguration::operator= ( ImpactModelConfiguration && )
default

◆ operator==()

bool itk::ImpactModelConfiguration::operator== ( const ImpactModelConfiguration & rhs) const
inline

Definition at line 136 of file itkImpactModelConfiguration.h.

◆ SetCentersIndexLayers()

void itk::ImpactModelConfiguration::SetCentersIndexLayers ( std::vector< std::vector< torch::indexing::TensorIndex > > & centersIndexLayers)
inline

Definition at line 261 of file itkImpactModelConfiguration.h.

◆ setup()

template<class TImage>
void itk::ImpactModelConfiguration::setup ( typename TImage::ConstPointer image)
inline

Definition at line 200 of file itkImpactModelConfiguration.h.

◆ to()

void itk::ImpactModelConfiguration::to ( torch::Device device) const
inline

Definition at line 193 of file itkImpactModelConfiguration.h.

◆ operator<<

std::ostream & operator<< ( std::ostream & os,
const ImpactModelConfiguration & config )
friend

Definition at line 143 of file itkImpactModelConfiguration.h.

Member Data Documentation

◆ m_CentersIndexLayers

std::vector<std::vector<torch::indexing::TensorIndex> > itk::ImpactModelConfiguration::m_CentersIndexLayers
private

Definition at line 276 of file itkImpactModelConfiguration.h.

◆ m_DataType

torch::ScalarType itk::ImpactModelConfiguration::m_DataType
private

Definition at line 277 of file itkImpactModelConfiguration.h.

◆ m_Dimension

unsigned int itk::ImpactModelConfiguration::m_Dimension
private

Definition at line 269 of file itkImpactModelConfiguration.h.

◆ m_imageDirectionTensor

torch::Tensor itk::ImpactModelConfiguration::m_imageDirectionTensor
private

Definition at line 279 of file itkImpactModelConfiguration.h.

◆ m_imageStatsTensor

torch::Tensor itk::ImpactModelConfiguration::m_imageStatsTensor
private

Definition at line 278 of file itkImpactModelConfiguration.h.

◆ m_LayersMask

std::vector<bool> itk::ImpactModelConfiguration::m_LayersMask
private

Definition at line 273 of file itkImpactModelConfiguration.h.

◆ m_Model

std::shared_ptr<torch::jit::script::Module> itk::ImpactModelConfiguration::m_Model
private

Definition at line 274 of file itkImpactModelConfiguration.h.

◆ m_ModelPath

std::string itk::ImpactModelConfiguration::m_ModelPath
private

Definition at line 268 of file itkImpactModelConfiguration.h.

◆ m_nArgs

std::vcl_size_t itk::ImpactModelConfiguration::m_nArgs
private

Definition at line 280 of file itkImpactModelConfiguration.h.

◆ m_nLayers

torch::Tensor itk::ImpactModelConfiguration::m_nLayers
private

Definition at line 281 of file itkImpactModelConfiguration.h.

◆ m_NumberOfChannels

unsigned int itk::ImpactModelConfiguration::m_NumberOfChannels
private

Definition at line 270 of file itkImpactModelConfiguration.h.

◆ m_PatchIndex

std::vector<std::vector<float> > itk::ImpactModelConfiguration::m_PatchIndex
private

Definition at line 275 of file itkImpactModelConfiguration.h.

◆ m_PatchSize

std::vector<int64_t> itk::ImpactModelConfiguration::m_PatchSize
private

Definition at line 271 of file itkImpactModelConfiguration.h.

◆ m_VoxelSize

std::vector<float> itk::ImpactModelConfiguration::m_VoxelSize
private

Definition at line 272 of file itkImpactModelConfiguration.h.



Generated on 26-02-2026 for elastix by doxygen 1.16.1 (669aeeefca743c148e2d935b3d3c69535c7491e6) elastix logo