Commit 7b041a13 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

STYLE

parent ed4d21d7
......@@ -41,9 +41,10 @@
namespace otb
{
/** \class CircleGlComponent
* \brief This Gl Component to render a Circle.
* No checking is done upon the adequation between the Circle
* projection and the underlying image projection. Gie possibility to represnts the circle center (by a point or a cross)
* \brief This Gl Component to render a circle.
* No checking is done upon the adequation between the circle
* projection and the underlying image projection. Gie possibility
* to represnts the circle center (by a point or a cross)
*
* Origin and Spacing allows to fit to the image axis.
* \ingroup Visualization
......@@ -53,7 +54,7 @@ class CircleGlComponent : public GlComponent
{
public:
/** Standard class typedefs */
typedef CircleGlComponent Self;
typedef CircleGlComponent Self;
typedef GlComponent Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......@@ -65,7 +66,7 @@ public:
typedef AffineTransformType::InputVectorType VectorType;
typedef Superclass::ColorType ColorType;
typedef itk::Index<> IndexType;
typedef itk::Index<> IndexType;
typedef std::vector<IndexType> IndexListType;
typedef std::vector<ColorType> ColorListType;
......@@ -89,42 +90,42 @@ public:
itkGetConstReferenceMacro(Origin,PointType);
/** Set/Get the index to render */
void SetIndexList(IndexListType idList) { m_IndexList = idList; };
IndexListType GetIndexList() { return m_IndexList; };
void AddIndex(IndexType id) { m_IndexList.push_back(id); m_ColorList.push_back(m_RedColor); };
void SetIndexList(IndexListType idList) { m_IndexList = idList; }
IndexListType GetIndexList() { return m_IndexList; }
void AddIndex(IndexType id) { m_IndexList.push_back(id); m_ColorList.push_back(m_RedColor); }
void RemoveIndex(unsigned int id)
{
if( id >= m_IndexList.size() )
itkExceptionMacro(<<"Index out of size ");
m_IndexList.erase(m_IndexList.begin()+id);
};
}
/** Set/Get the color */
void SetColorList(ColorListType colorList) { m_ColorList = colorList; };
ColorListType GetColorList() { return m_ColorList; };
void SetColorList(ColorListType colorList) { m_ColorList = colorList; }
ColorListType GetColorList() { return m_ColorList; }
void ChangeColor(ColorType color, unsigned int id)
{
if( id >= m_ColorList.size() )
itkExceptionMacro(<<"Index out of size ");
m_ColorList[id] = color;
};
}
void RemoveColor(unsigned int id)
{
if( id >= m_ColorList.size() )
itkExceptionMacro(<<"Index out of size ");
m_ColorList.erase(m_ColorList.begin()+id);
};
}
/** Clear all*/
void Clear() { m_IndexList.clear(); m_ColorList.clear(); };
void Clear() { m_IndexList.clear(); m_ColorList.clear(); }
void ClearIndex(unsigned int id)
{
this->RemoveIndex(id);
this->RemoveColor(id);
};
}
/** Set/Get the line width */
itkSetMacro(LineWidth,double);
......@@ -188,6 +189,3 @@ private:
} // end namespace otb
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment