ITK  4.13.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
itk::NeuralNetworkFileWriter< TNetwork > Class Template Reference

#include <itkNeuralNetworkFileWriter.h>

+ Inheritance diagram for itk::NeuralNetworkFileWriter< TNetwork >:
+ Collaboration diagram for itk::NeuralNetworkFileWriter< TNetwork >:

Detailed Description

template<typename TNetwork>
class itk::NeuralNetworkFileWriter< TNetwork >

Writer for Neural Network.

This class will enable a user to save a trained neural network to a text file. The user can also change the network topology by editing the network configuration file.

This class was contributed to the Insight Journal by Raghu Venkatram The original paper can be found at https://hdl.handle.net/1926/203

Author
Raghu Venkatram
See Also
NeuralNetworkFileReader
MultilayerNeuralNetworkBase

Definition at line 55 of file itkNeuralNetworkFileWriter.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef LayerBaseType::ConstPointer LayerBaseConstPointer
 
typedef LayerBaseType::Pointer LayerBasePointer
 
typedef Statistics::LayerBase
< MeasurementVectorType,
TargetVectorType
LayerBaseType
 
typedef
TNetwork::MeasurementVectorType 
MeasurementVectorType
 
enum  NetworkWriteWeightsType {
  IGNORE = 0,
  ASCII = 1,
  BINARY = 2
}
 
typedef SmartPointer< SelfPointer
 
typedef NeuralNetworkFileWriter Self
 
typedef Object Superclass
 
typedef TNetwork::TargetVectorType TargetVectorType
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetFileName () const
 
const TNetwork * GetInput () const
 
virtual const char * GetNameOfClass () const
 
virtual NetworkWriteWeightsType GetWriteWeightValuesType () const
 
virtual void SetFileName (const char *_arg)
 
virtual void SetWriteWeightValuesType (const NetworkWriteWeightsType _arg)
 
void Update ()
 
void SetInput (TNetwork *network)
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

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 flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Protected Member Functions

 NeuralNetworkFileWriter ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~NeuralNetworkFileWriter ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~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 Types

typedef std::vector
< MET_FieldRecordType * > 
FieldsContainerType
 

Private Member Functions

void ClearFields ()
 

Private Attributes

FieldsContainerType m_Fields
 
std::string m_FileName
 
TNetwork::Pointer m_Network
 
std::ofstream m_OutputFile
 
NetworkWriteWeightsType m_WriteWeightValuesType
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TNetwork >
typedef SmartPointer< const Self > itk::NeuralNetworkFileWriter< TNetwork >::ConstPointer

Definition at line 63 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef std::vector< MET_FieldRecordType * > itk::NeuralNetworkFileWriter< TNetwork >::FieldsContainerType
private

Definition at line 136 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef LayerBaseType::ConstPointer itk::NeuralNetworkFileWriter< TNetwork >::LayerBaseConstPointer

Definition at line 76 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef LayerBaseType::Pointer itk::NeuralNetworkFileWriter< TNetwork >::LayerBasePointer

Definition at line 75 of file itkNeuralNetworkFileWriter.h.

Definition at line 74 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef TNetwork::MeasurementVectorType itk::NeuralNetworkFileWriter< TNetwork >::MeasurementVectorType

Definition at line 69 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef SmartPointer< Self > itk::NeuralNetworkFileWriter< TNetwork >::Pointer

Definition at line 62 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef NeuralNetworkFileWriter itk::NeuralNetworkFileWriter< TNetwork >::Self

SmartPointer typedef support

Definition at line 60 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef Object itk::NeuralNetworkFileWriter< TNetwork >::Superclass

Definition at line 61 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
typedef TNetwork::TargetVectorType itk::NeuralNetworkFileWriter< TNetwork >::TargetVectorType

Definition at line 72 of file itkNeuralNetworkFileWriter.h.

Member Enumeration Documentation

template<typename TNetwork >
enum itk::NeuralNetworkFileWriter::NetworkWriteWeightsType
Enumerator
IGNORE 
ASCII 
BINARY 

Definition at line 124 of file itkNeuralNetworkFileWriter.h.

Constructor & Destructor Documentation

template<typename TNetwork >
itk::NeuralNetworkFileWriter< TNetwork >::NeuralNetworkFileWriter ( )
protected
template<typename TNetwork >
itk::NeuralNetworkFileWriter< TNetwork >::~NeuralNetworkFileWriter ( )
protected

Member Function Documentation

template<typename TNetwork >
void itk::NeuralNetworkFileWriter< TNetwork >::ClearFields ( )
private
template<typename TNetwork >
virtual::itk::LightObject::Pointer itk::NeuralNetworkFileWriter< TNetwork >::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.

template<typename TNetwork >
virtual const char* itk::NeuralNetworkFileWriter< TNetwork >::GetFileName ( ) const
virtual

Get the filename

template<typename TNetwork >
const TNetwork* itk::NeuralNetworkFileWriter< TNetwork >::GetInput ( ) const
template<typename TNetwork >
virtual const char* itk::NeuralNetworkFileWriter< TNetwork >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::Object.

template<typename TNetwork >
virtual NetworkWriteWeightsType itk::NeuralNetworkFileWriter< TNetwork >::GetWriteWeightValuesType ( ) const
virtual
template<typename TNetwork >
static Pointer itk::NeuralNetworkFileWriter< TNetwork >::New ( )
static

Method for creation through the object factory

template<typename TNetwork >
virtual void itk::NeuralNetworkFileWriter< TNetwork >::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.

template<typename TNetwork >
virtual void itk::NeuralNetworkFileWriter< TNetwork >::SetFileName ( const char *  _arg)
virtual

Set the filename

template<typename TNetwork >
void itk::NeuralNetworkFileWriter< TNetwork >::SetInput ( TNetwork *  network)

Set/Get the input transform to write

template<typename TNetwork >
virtual void itk::NeuralNetworkFileWriter< TNetwork >::SetWriteWeightValuesType ( const NetworkWriteWeightsType  _arg)
virtual
template<typename TNetwork >
void itk::NeuralNetworkFileWriter< TNetwork >::Update ( )

Read NeuralNetwork

Member Data Documentation

template<typename TNetwork >
FieldsContainerType itk::NeuralNetworkFileWriter< TNetwork >::m_Fields
private

Definition at line 145 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
std::string itk::NeuralNetworkFileWriter< TNetwork >::m_FileName
private

Definition at line 144 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
TNetwork::Pointer itk::NeuralNetworkFileWriter< TNetwork >::m_Network
private

Definition at line 140 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
std::ofstream itk::NeuralNetworkFileWriter< TNetwork >::m_OutputFile
private

Definition at line 147 of file itkNeuralNetworkFileWriter.h.

template<typename TNetwork >
NetworkWriteWeightsType itk::NeuralNetworkFileWriter< TNetwork >::m_WriteWeightValuesType
private

Definition at line 142 of file itkNeuralNetworkFileWriter.h.


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