Skip to content
Snippets Groups Projects
Commit 3a3bcf73 authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding methods to explore examples

parent 8250d88f
No related branches found
No related tags found
No related merge requests found
......@@ -522,6 +522,31 @@ public:
return m_DocExample;
}
unsigned int GetNumberOfExamples()
{
return m_DocExample->GetNbOfExamples();
}
std::string GetExampleComment(unsigned int id)
{
return m_DocExample->GetExampleComment(id);
}
unsigned int GetExampleNumberOfParameters(unsigned int id)
{
return m_DocExample->GetNumberOfParameters(id);
}
std::string GetExampleParameterKey(unsigned int exId, unsigned int paramId)
{
return m_DocExample->GetParameterKey(paramId,exId);
}
std::string GetExampleParameterValue(unsigned int exId, unsigned int paramId)
{
return m_DocExample->GetParameterValue(paramId,exId);
}
void SetDocExampleParameterValue( const std::string key, const std::string value, unsigned int exId=0 )
{
m_DocExample->AddParameter( key, value, exId );
......
......@@ -50,6 +50,11 @@ DocExampleStructure::GetParameterList()
return m_ParameterList;
}
unsigned int DocExampleStructure::GetNumberOfParameters(unsigned int exId)
{
return m_ParameterList.at(exId).size();
}
/** Get a specific parameter couple.*/
std::string
DocExampleStructure::GetParameterKey( unsigned int i, unsigned int exId)
......
......@@ -61,6 +61,9 @@ public:
typedef std::vector<ParameterType> ParametersVectorType;
typedef std::vector<ParametersVectorType> ParametersVectorOfVectorType;
/** Get the number of examples */
itkGetMacro(NbOfExamples,unsigned int);
/** Parameter list accessors. */
/** Parameter list accessors : adding key and name */
void AddParameter( const std::string key, const std::string name, unsigned int exId = 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment