#include <freParameter.h>


Public Types | |
| enum | ParameterValueType { PVTBool, PVTDouble, PVTInteger, PVTLong, PVTULong, PVTString, PVTURI, PVTIDPath } |
| typedef Parameter | Self |
| typedef itk::LightObject | Superclass |
| typedef itk::SmartPointer < Self > | Pointer |
| typedef itk::SmartPointer < const Self > | ConstPointer |
| typedef ParameterLayer::ValueCountType | ValueCountType |
| typedef unsigned long | LayerCountType |
Public Member Functions | |
| virtual const char * | GetNameOfClass () const |
| virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
| void | SetParameterName (const std::string &sName) |
| const std::string & | GetParameterName () const |
| void | SetTemplateID (const std::string &sTemplateID) |
| const std::string & | GetTemplateID () const |
| bool | IsTemplateBased () const |
| LayerCountType | AddParameterLayer (bool bCopyValue=true, const std::string &sNewValue="") |
| void | DeleteParameterLayer (const LayerCountType iLayer) |
| virtual void | Reset () |
| void | Resize (const ValueCountType iNewSize, const std::string &sNewValue="") |
| void | Resize (const ValueCountType iNewSize, const LayerCountType iNewLayerCount, const std::string &sNewValue="") |
| ValueCountType | ParameterSize () const |
| LayerCountType | LayerCount () const |
| ParameterLayer * | GetParameterLayer (const LayerCountType iLayer) const |
| bool | GetParameterValue (bool &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) const |
| bool | GetParameterValue (double &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) const |
| bool | GetParameterValue (int &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) const |
| bool | GetParameterValue (long &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) const |
| bool | GetParameterValue (unsigned long &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) const |
| bool | GetParameterValue (std::string &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) const |
| bool | SetParameterValue (const bool value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) |
| bool | SetParameterValue (const double value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) |
| bool | SetParameterValue (const int value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) |
| bool | SetParameterValue (const long value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) |
| bool | SetParameterValue (const unsigned long value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) |
| bool | SetParameterValue (const std::string &value, const ValueCountType iItemPos=0, const LayerCountType iLayer=0) |
| bool | SetParameterLayer (const LayerCountType iLayer, const ParameterLayer &rSourceLayer) |
| virtual Parameter & | operator= (const Parameter &rParameter) |
Static Public Member Functions | |
| static Pointer | New (void) |
| static Pointer | New (const std::string &sParameterName, const ValueCountType iLayerSize=1, const LayerCountType iLayerCount=1, const std::string &sDefaultValue="") |
Protected Types | |
| typedef std::vector < ParameterLayer::Pointer > | LayersType |
Protected Member Functions | |
| Parameter (const std::string &sParameterName, const ValueCountType iLayerSize=1, const LayerCountType iLayerCount=1, const std::string &sDefaultValue="") | |
| Parameter () | |
| virtual | ~Parameter () |
| virtual void | SubElementLoadProcessing (const std::string &rsXMLSubTag, const std::string &rsXMLSubElement, const std::string &rsXMLSubData) |
| virtual std::string | SaveData (const unsigned int &iDepth, bool &bHasSubElements) const |
| virtual void | AttributesLoadProcessing (const AttributesType &rAttributes) |
| virtual void | SaveAttributes (AttributesSaveListType &rAttributes) const |
Protected Attributes | |
| LayersType | m_Layers |
| std::string | m_sParameterName |
| std::string | m_sTemplateID |
| LayerCountType | m_iLayerSize |
Parameter is the base class for containing all information stored as a parameters with a set of different values in different layers.
Definition at line 37 of file freParameter.h.
| typedef Parameter FREE::Parameter::Self |
| typedef itk::LightObject FREE::Parameter::Superclass |
| typedef itk::SmartPointer<Self> FREE::Parameter::Pointer |
| typedef itk::SmartPointer<const Self> FREE::Parameter::ConstPointer |
Definition at line 63 of file freParameter.h.
| typedef unsigned long FREE::Parameter::LayerCountType |
Definition at line 64 of file freParameter.h.
typedef std::vector<ParameterLayer::Pointer> FREE::Parameter::LayersType [protected] |
Definition at line 214 of file freParameter.h.
Enumeration of the different parameter types known within the framework and used in the setups
| PVTBool | Parameter is meant to be a boolean. For standarization use "0" for false and "1" for true. |
| PVTDouble | Parameter is meant to be a double. |
| PVTInteger | Parameter is meant to be an integer. |
| PVTLong | Parameter is meant to be a long. |
| PVTULong | Parameter is meant to be a unsigned long. |
| PVTString | Parameter is meant to be a string, so no conversion needed. |
| PVTURI | Parameter is meant to be an external file link with resource information. It is stored and gathered like a string but handled as a file (e.g. in editors) |
| PVTIDPath | Parameter is meant to be an IDPath. It is stored and gathered like a string but handled as an IDPath (e.g. in editors) |
Definition at line 48 of file freParameter.h.
| FREE::Parameter::Parameter | ( | const std::string & | sParameterName, | |
| const ValueCountType | iLayerSize = 1, |
|||
| const LayerCountType | iLayerCount = 1, |
|||
| const std::string & | sDefaultValue = "" | |||
| ) | [protected] |
Definition at line 242 of file freParameter.cxx.
References AddParameterLayer(), m_sParameterName, m_sTemplateID, Reset(), and Resize().

| FREE::Parameter::Parameter | ( | ) | [protected] |
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 255 of file freParameter.cxx.
References m_sParameterName, m_sTemplateID, Reset(), and Resize().

| FREE::Parameter::~Parameter | ( | ) | [protected, virtual] |
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 283 of file freParameter.cxx.
References Reset().

| virtual const char* FREE::Parameter::GetNameOfClass | ( | ) | const [inline, virtual] |
Run-time type information (and related methods).
Reimplemented from FREE::XMLStreamObject.
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 67 of file freParameter.h.
| static Pointer FREE::Parameter::New | ( | void | ) | [inline, static] |
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 69 of file freParameter.h.
Referenced by FREE::ParameterCollection::AddParameter(), FREE::RigidRegistrationControllerBase< TControlledRigidProcessor >::GetParameter(), FREE::PointSetRegistrationControllerBase< TControlledRigidProcessor >::GetParameter(), FREE::MetricControllerBase< TControlledMetric >::GetParameter(), FREE::MediaDrainController::GetParameter(), FREE::ParameterCollection::operator=(), and FREE::ParameterCollection::SubElementLoadProcessing().
| virtual ::itk::LightObject::Pointer FREE::Parameter::CreateAnother | ( | void | ) | const [inline, virtual] |
| Parameter::Pointer FREE::Parameter::New | ( | const std::string & | sParameterName, | |
| const ValueCountType | iLayerSize = 1, |
|||
| const LayerCountType | iLayerCount = 1, |
|||
| const std::string & | sDefaultValue = "" | |||
| ) | [static] |
Special version of the itk New method to create an instance with a given value count and default value.
Definition at line 265 of file freParameter.cxx.
References Resize(), and SetParameterName().

| void FREE::Parameter::SetParameterName | ( | const std::string & | sName | ) | [inline] |
Definition at line 74 of file freParameter.h.
References m_sParameterName.
Referenced by FREE::TransformControllerBase< TControlledTransform, iDimension >::ActualizeMainComponent(), New(), and FREE::ParameterListIO::SaveListToFile().
| const std::string& FREE::Parameter::GetParameterName | ( | ) | const [inline] |
Definition at line 75 of file freParameter.h.
References m_sParameterName.
Referenced by FREE::GenericSetupToImageAdaptor::AdaptComponent(), FREE::GenericSetupToImageAdaptor::ExtendComponent(), FREE::ComponentControllerBase< TControlledComponent >::GenerateProfileTemplateRealization(), FREE::CtrlProfile::ProfileParameterIdentifier::KeyMatches(), FREE::ParameterListMediaController::LoadMedia(), operator=(), FREE::CtrlProfile::ProfileOption::ProfileMatchesOption(), and FREE::ParameterListMediaController::SaveMedia().
| void FREE::Parameter::SetTemplateID | ( | const std::string & | sTemplateID | ) | [inline] |
Sets the template ID (ID of the parameter name (in the profile) that was the template for this parameter
Definition at line 79 of file freParameter.h.
References m_sTemplateID.
| const std::string& FREE::Parameter::GetTemplateID | ( | ) | const [inline] |
Gets the template id
Definition at line 81 of file freParameter.h.
References m_sTemplateID.
Referenced by FREE::ComponentControllerBase< TControlledComponent >::GenerateProfileTemplateRealization(), and operator=().
| bool FREE::Parameter::IsTemplateBased | ( | ) | const [inline] |
Indicates if the parameter is based on a profile template or a concrete profile definition.
Definition at line 84 of file freParameter.h.
References m_sTemplateID.
Referenced by FREE::ComponentControllerBase< TControlledComponent >::GenerateProfileTemplateRealization(), and SaveAttributes().
| Parameter::LayerCountType FREE::Parameter::AddParameterLayer | ( | bool | bCopyValue = true, |
|
| const std::string & | sNewValue = "" | |||
| ) |
Function adds a layer of values to be used in a following layer of registration. The layer will be appended at the end
| [in] | bCopyValue | indicates if the items of the preceding parameter layer should be copied. |
| [in] | sNewValue | Values of the added layer. |
Definition at line 35 of file freParameter.cxx.
References m_Layers, FREE::ParameterLayer::New(), and ParameterSize().
Referenced by operator=(), Parameter(), Resize(), and FREE::PointSetMediaControllerBase< PixelType, 2 >::SaveSetToSetup().

| void FREE::Parameter::DeleteParameterLayer | ( | const LayerCountType | iLayer | ) |
Deletes the defined layer of value.
| [in] | iLayer | indicates the layer. |
Definition at line 51 of file freParameter.cxx.
References m_Layers.
Referenced by Reset().
| void FREE::Parameter::Reset | ( | ) | [virtual] |
Resets to no layers, but layer size stays unchanged.
Reimplemented from FREE::XMLStreamObject.
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 61 of file freParameter.cxx.
References DeleteParameterLayer(), m_Layers, and FREE::XMLStreamObject::Reset().
Referenced by Parameter(), FREE::CtrlProfile::Parameter::Reset(), Resize(), FREE::PointSetMediaControllerBase< PixelType, 2 >::SaveSetToSetup(), and ~Parameter().

| void FREE::Parameter::Resize | ( | const ValueCountType | iNewSize, | |
| const std::string & | sNewValue = "" | |||
| ) |
Resizes the parameter in all layers to the passed new value count. After resizing all values are set to default (empty strings).
| [in] | iNewSize | The new size/count of values per layer |
| [in] | sNewValue | New value after the resizing. |
Definition at line 72 of file freParameter.cxx.
References m_iLayerSize, and m_Layers.
Referenced by New(), operator=(), Parameter(), Resize(), FREE::PointSetMediaControllerBase< PixelType, 2 >::SaveSetToSetup(), FREE::BSplineDeformableTransformControllerBase< 3, 3 >::SetInitialTransformValues(), and FREE::CtrlProfile::Parameter::SetParameterSize().
| void FREE::Parameter::Resize | ( | const ValueCountType | iNewSize, | |
| const LayerCountType | iNewLayerCount, | |||
| const std::string & | sNewValue = "" | |||
| ) |
Resizes the parameter and changes layer count. After resizing all values are set to default (empty strings).
| [in] | iNewSize | The new size/count of values per layer. |
| [in] | iNewLayerCount | The new count of layers. |
| [in] | sNewValue | New value after the resizing. |
Definition at line 83 of file freParameter.cxx.
References AddParameterLayer(), Reset(), and Resize().

| Parameter::ValueCountType FREE::Parameter::ParameterSize | ( | ) | const |
Returns the count of values per layer.
Definition at line 93 of file freParameter.cxx.
References m_iLayerSize.
Referenced by AddParameterLayer(), FREE::TransformSetupAdaptor::GetScales(), and operator=().
| Parameter::LayerCountType FREE::Parameter::LayerCount | ( | ) | const |
Returns the count of value layers
Definition at line 100 of file freParameter.cxx.
References m_Layers.
Referenced by FREE::CompareHistogramMetricControllerBase< TControlledCompareHistogramMetric >::ActualizeMainComponent(), FREE::SetupTransformControllerBase< FREE::ConstrainedSetupTransform >::GenerateProfile(), FREE::ConstrainedSetupTransformController::GenerateProfile(), FREE::CtrlProfile::Parameter::GetHasDefault(), GetParameterLayer(), GetParameterValue(), FREE::TransformSetupAdaptor::GetScales(), FREE::PointSetMediaControllerBase< PixelType, 2 >::LoadSetFromSetup(), operator=(), SetParameterLayer(), SetParameterValue(), and SubElementLoadProcessing().
| ParameterLayer * FREE::Parameter::GetParameterLayer | ( | const LayerCountType | iLayer | ) | const |
Returns the values of the specified layer. If the passed layer index is out of range the return is NULL.
| [in] | iLayer | Specific the layer of the parameter value array, that should be returned. |
Definition at line 107 of file freParameter.cxx.
References LayerCount(), and m_Layers.
Referenced by FREE::SetupOptimizationOptimizerControllerBase< TControlledOptimizer >::ActualizeMainComponent(), FREE::SetupOptimizationMetricControllerBase< TControlledMetric >::ActualizeMainComponent(), FREE::CompareHistogramMetricControllerBase< TControlledCompareHistogramMetric >::ActualizeMainComponent(), FREE::PointSetMediaControllerBase< PixelType, 2 >::LoadSetFromSetup(), operator=(), and FREE::PointSetMediaControllerBase< PixelType, 2 >::SaveSetToSetup().

| bool FREE::Parameter::GetParameterValue | ( | bool & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) | const |
Returns a bool value. If at least one layer of values exists but the passed iLayer is out of bound, the last existing layer will be used.
| [out] | value | Wanted value of the parameter. |
| [in] | iItemPos | Indicates the position of the wanted value. |
| [in] | iLayer | Indicates the layer of the wanted value. |
Definition at line 115 of file freParameter.cxx.
References LayerCount(), and m_Layers.
Referenced by FREE::OrientImageFilterControllerBase< FREE::ImageTypes< 3 >::InternalImageType, 3 >::GenerateProfile(), FREE::MutualInformationMetricControllerBase< ImageTypes< 3 >::InternalImageType >::GenerateProfile(), FREE::MattesMutualInformationMetricControllerBase< ImageTypes< 3 >::InternalImageType >::GenerateProfile(), FREE::BSplineDeformableTransformControllerBase< 3, 3 >::GenerateProfile(), FREE::PointSetMediaControllerBase< PixelType, 2 >::LoadMedia(), FREE::ParameterListMediaController::LoadMedia(), FREE::PointSetMediaControllerBase< PixelType, 2 >::LoadSetFromSetup(), FREE::PointSetMediaControllerBase< PixelType, 2 >::SaveMedia(), and FREE::ParameterListMediaController::SaveMedia().

| bool FREE::Parameter::GetParameterValue | ( | double & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) | const |
Returns a double value of the given parameter.
Definition at line 123 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::GetParameterValue | ( | int & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) | const |
Returns an integer value of the given parameter.
Definition at line 131 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::GetParameterValue | ( | long & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) | const |
Returns a long value of the given parameter.
Definition at line 140 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::GetParameterValue | ( | unsigned long & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) | const |
Returns a unsigned long value of the given parameter.
Definition at line 148 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::GetParameterValue | ( | std::string & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) | const |
Returns a string value of the given parameter.
Definition at line 156 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterValue | ( | const bool | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) |
Sets a bool value.
| [in] | value | New value of the parameter. |
| [in] | iItemPos | Indicates the position of the wanted value. |
| [in] | iLayer | Indicates the layer of the wanted value. |
Definition at line 164 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterValue | ( | const double | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) |
Sets a double value of the given parameter.
Definition at line 172 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterValue | ( | const int | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) |
Sets an integer value of the given parameter.
Definition at line 180 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterValue | ( | const long | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) |
Sets a long value of the given parameter.
Definition at line 188 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterValue | ( | const unsigned long | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) |
Sets a unsigned long value of the given parameter.
Definition at line 196 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterValue | ( | const std::string & | value, | |
| const ValueCountType | iItemPos = 0, |
|||
| const LayerCountType | iLayer = 0 | |||
| ) |
Sets a string value of the given parameter.
Definition at line 204 of file freParameter.cxx.
References LayerCount(), and m_Layers.

| bool FREE::Parameter::SetParameterLayer | ( | const LayerCountType | iLayer, | |
| const ParameterLayer & | rSourceLayer | |||
| ) |
Sets the values of a layer. Returns if the functions succedeed. The function fails, if the layer is out of bound or the count of passed layer is different from the actual count.
| [in] | iLayer | Specific the layer of the parameter value array, that should be set. |
| [in] | rSourceLayer | Reference to the new values that serve as source. |
Definition at line 212 of file freParameter.cxx.
References LayerCount(), m_Layers, and FREE::XMLValueSet::Size().

Assignment operator.
Definition at line 224 of file freParameter.cxx.
References AddParameterLayer(), GetParameterLayer(), GetParameterName(), GetTemplateID(), LayerCount(), m_Layers, m_sParameterName, m_sTemplateID, ParameterSize(), and Resize().
Referenced by FREE::CtrlProfile::Parameter::operator=().

| void FREE::Parameter::SubElementLoadProcessing | ( | const std::string & | rsXMLSubTag, | |
| const std::string & | rsXMLSubElement, | |||
| const std::string & | rsXMLSubData | |||
| ) | [protected, virtual] |
Reimplemented from FREE::XMLStreamObject.
Definition at line 290 of file freParameter.cxx.
References catchAllNPassMacro, FREE::cXML_ParameterLayer, FREE::XMLStreamObject::cXML_Text, LayerCount(), m_iLayerSize, m_Layers, FREE::ParameterLayer::New(), and throwExceptionMacro.

| std::string FREE::Parameter::SaveData | ( | const unsigned int & | iDepth, | |
| bool & | bHasSubElements | |||
| ) | const [protected, virtual] |
Reimplemented from FREE::XMLStreamObject.
Definition at line 315 of file freParameter.cxx.
References FREE::XMLStreamObject::AddSubElement(), and m_Layers.

| void FREE::Parameter::AttributesLoadProcessing | ( | const AttributesType & | rAttributes | ) | [protected, virtual] |
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 329 of file freParameter.cxx.
References FREE::cXML_ParameterName, FREE::cXML_ParameterSize, FREE::cXML_TemplateID, m_iLayerSize, m_sParameterName, m_sTemplateID, and FREE::Convert::ToInt().

| void FREE::Parameter::SaveAttributes | ( | AttributesSaveListType & | rAttributes | ) | const [protected, virtual] |
Reimplemented in FREE::CtrlProfile::Parameter.
Definition at line 341 of file freParameter.cxx.
References FREE::cXML_ParameterName, FREE::cXML_ParameterSize, FREE::cXML_TemplateID, IsTemplateBased(), m_iLayerSize, m_Layers, m_sParameterName, m_sTemplateID, and FREE::Convert::ToStr().

LayersType FREE::Parameter::m_Layers [protected] |
This a vector of all layers with their values.
Definition at line 217 of file freParameter.h.
Referenced by AddParameterLayer(), DeleteParameterLayer(), GetParameterLayer(), GetParameterValue(), LayerCount(), operator=(), Reset(), Resize(), SaveAttributes(), SaveData(), SetParameterLayer(), SetParameterValue(), and SubElementLoadProcessing().
std::string FREE::Parameter::m_sParameterName [protected] |
Name of the Parameter
Definition at line 220 of file freParameter.h.
Referenced by FREE::CtrlProfile::Parameter::AttributesLoadProcessing(), AttributesLoadProcessing(), GetParameterName(), operator=(), Parameter(), FREE::CtrlProfile::Parameter::SaveAttributes(), SaveAttributes(), and SetParameterName().
std::string FREE::Parameter::m_sTemplateID [protected] |
If a parameter is based on a parameter template of the profile, the parameter name of this template will be stored as template ID to mark this fact. This is needed for example to allow the generation of proper component profiles. (see also ComponentControllerBase::GenerateProfileTemplateRealization()
Definition at line 227 of file freParameter.h.
Referenced by AttributesLoadProcessing(), GetTemplateID(), IsTemplateBased(), operator=(), Parameter(), SaveAttributes(), and SetTemplateID().
LayerCountType FREE::Parameter::m_iLayerSize [protected] |
Definition at line 229 of file freParameter.h.
Referenced by FREE::CtrlProfile::Parameter::AttributesLoadProcessing(), AttributesLoadProcessing(), ParameterSize(), Resize(), FREE::CtrlProfile::Parameter::SaveAttributes(), SaveAttributes(), FREE::CtrlProfile::Parameter::SetParameterSize(), and SubElementLoadProcessing().
1.5.3 written by Dimitri van Heesch,
© 1997-2000