23 m_Extent(), m_AxisOrigin(), m_AxisLength(),
24 m_GridOrigin(), m_GridSpacing(), m_ZeroCrossingAxis(true),
25 m_AutoScale(true), m_AxisColor(), m_GridColor(), m_ScaleAxeYDefault(true),
26 m_SpaceToScreenTransform()
72 unsigned int size =
m_Curves->Size();
74 for (
unsigned int j = 0; j < size; ++j)
76 if (
m_Curves->GetNthElement(j)->GetId() == id)
87 for (
unsigned int j = 0; j <
m_Curves->Size(); ++j)
89 if (
m_Curves->GetNthElement(j)->GetId() == id)
95 itkExceptionMacro(<<
"No curve found with ID " <<
id);
117 it.
Get()->BeforeRendering();
148 min = it.
Get()->GetMinimum();
149 max = it.
Get()->GetMaximum();
154 newMin = it.
Get()->GetMinimum();
155 newMax = it.
Get()->GetMaximum();
157 if (newMin[0] < min[0]) min[0] = newMin[0];
158 if (newMin[1] < min[1]) min[1] = newMin[1];
159 if (newMax[0] > max[0]) max[0] = newMax[0];
160 if (newMax[1] > max[1]) max[1] = newMax[1];
183 extentSize[0] = this->w() - 2 *
m_Margins[0];
184 extentSize[1] = this->h() - 2 *
m_Margins[1];
211 double xAxisYPos =
static_cast<double>(
m_Margins[0]);
212 double yAxisXPos =
static_cast<double>(
m_Margins[1]);
215 spaceCenter.
Fill(0.);
224 yAxisXPos = screenCenter[0];
228 xAxisYPos = screenCenter[1];
234 glVertex2d(this->w() -
m_Margins[0], yAxisXPos);
236 glVertex2d(xAxisYPos, this->h() -
m_Margins[1]);
239 gl_font(FL_COURIER_BOLD, 10);
242 screenLabelPosition[0] = yAxisXPos + 10;
243 screenLabelPosition[1] = this->h() -
m_Margins[1] - 10;
244 gl_draw(
m_YAxisLabel.c_str(), (float) screenLabelPosition[0], (
float) screenLabelPosition[1]);
248 screenLabelPosition[1] = xAxisYPos - 10;
249 gl_draw(
m_XAxisLabel.c_str(), (float) screenLabelPosition[0], (
float) screenLabelPosition[1]);
253 screenLabelPosition[1] = this->h() -
m_Margins[1] - 10;
254 gl_draw(
m_Title.c_str(), (float) screenLabelPosition[0], (
float) screenLabelPosition[1]);
267 double pos = screenGridOrigin[0];
271 glVertex2d(pos, this->h() -
m_Margins[1]);
272 pos += screenGridSpacing[0];
275 pos = screenGridOrigin[1];
280 glVertex2d(this->w() -
m_Margins[0], pos);
281 pos += screenGridSpacing[1];
287 pos = screenGridOrigin[1];
297 std::ostringstream oss;
298 gl_font(FL_COURIER_BOLD, 8);
299 glColor4d(0, 0, 0, 0.5);
305 gl_draw(oss.str().c_str(), (float)
m_Margins[0]-20, (
float)pos);
306 pos+=screenGridSpacing[1];
313 pos = screenGridOrigin[0];
318 gl_draw(oss.str().c_str(), (float)pos,
m_Margins[1]-5);
319 pos+=screenGridSpacing[0];
332 if (it.Get()->GetVisible())