NorMIT-nav  22.09
An IGT application
cxGraphicalPrimitives.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #include "cxGraphicalPrimitives.h"
13 
14 #include "boost/bind.hpp"
15 #include <vtkSphereSource.h>
16 #include <vtkLineSource.h>
17 #include <vtkArcSource.h>
18 #include <vtkPolyDataMapper.h>
19 #include <vtkActor.h>
20 #include <vtkCellArray.h>
21 #include <vtkProperty.h>
22 #include <vtkRenderer.h>
23 #include <vtkCommand.h>
24 #include <vtkFollower.h>
25 #include <vtkVectorText.h>
26 #include <vtkCamera.h>
27 #include "cxTypeConversions.h"
28 #include "cxBoundingBox3D.h"
29 #include "vtkArrowSource.h"
30 #include "vtkMatrix4x4.h"
31 #include "vtkCaptionActor2D.h"
32 #include "vtkTextProperty.h"
33 #include "cxVtkHelperClasses.h"
34 #include "vtkPolyDataNormals.h"
35 
36 namespace cx
37 {
38 
39 
41 {
42  mProperty = vtkPropertyPtr::New();
43  mActor = vtkActorPtr::New();
44  mActor->SetProperty(mProperty);
45 }
46 
48 {
49  this->setRenderer(NULL);
50 }
51 
53 {
55  mSource = source;
56 
57  if (mSource)
58  getMapper()->SetInputConnection(mSource->GetOutputPort());
59  else
60  getMapper()->SetInputConnection(NULL);
61 }
62 
64 {
65  if (mRenderer)
66  mRenderer->RemoveActor(mActor);
67 
68  mRenderer = renderer;
69 
70  if (mRenderer)
71  mRenderer->AddActor(mActor);
72 }
73 
75 {
76  mActor->SetVisibility(visible);
77 }
78 
79 
81 {
82  mActor->GetProperty()->SetBackfaceCulling(val);
83 }
84 
86 {
87  mActor->GetProperty()->SetFrontfaceCulling(val);
88 }
89 
90 void GraphicalGeometricBase::setColor(double red, double green, double blue)
91 {
92  mActor->GetProperty()->SetColor(red, green, blue);
93 }
94 
96 {
97  mActor->GetProperty()->SetColor(color.begin());
98 }
99 
101 {
102  mActor->SetPosition(point.begin());
103 }
104 
106 {
107  mActor->GetProperty()->SetOpacity(val);
108 }
109 
110 void GraphicalGeometricBase::setUserMatrix(vtkMatrix4x4 *matrix)
111 {
112  mActor->SetUserMatrix(matrix);
113 }
114 
116 {
117  if(pointSize<=0)
118  return;
119  mProperty->SetPointSize(pointSize);
120 }
121 
123 {
124  getMapper()->SetScalarVisibility(show);
125 }
126 
128 {
129  getMapper()->SetScalarModeToUseCellData();
130 }
131 
133 {
134  return Vector3D(mActor->GetPosition());
135 }
136 
138 {
139  return mActor;
140 }
141 
143 {
144  return mProperty;
145 }
146 
148 {
149  if (mSource)
150  return mSource->GetOutput();
151  else
152  return mData;
153 }
154 
156 {
157  return mSource;
158 }
159 
160 //--------------------------------------------------------
161 //--------------------------------------------------------
162 //-------------------------------------------------------
163 
165  GraphicalGeometricBase(source,renderer)
166 {
167  mMapper = vtkPolyDataMapperPtr::New();
168 
169  mActor->SetMapper(mMapper);
170  setSource(source);
171  setRenderer(renderer);
172 }
173 
175 {
176  mActor->GetProperty()->SetRepresentationToWireframe();
177 }
178 
180 {
182  mData = data;
183 
184  mMapper->SetInputData(mData);
185 }
186 
188 {
189  mActor->SetTexture(texture);
190 }
191 
192 
194 {
195  return mMapper;
196 }
197 
198 //--------------------------------------------------------
199 //--------------------------------------------------------
200 //-------------------------------------------------------
201 
203  GraphicalGeometricBase(source,renderer)
204 {
205  mMapper = vtkSmartPointer<vtkGlyph3DMapper>::New();
206  vtkSmartPointer<vtkArrowSource> arrowSource = vtkSmartPointer<vtkArrowSource>::New();
207  mMapper->SetSourceConnection(arrowSource->GetOutputPort());
208  mMapper->ScalarVisibilityOn();
209  mMapper->SetUseLookupTableScalarRange(1);
210  mMapper->SetScalarMode(VTK_SCALAR_MODE_USE_POINT_FIELD_DATA);
211  mActor->SetMapper(mMapper);
212  setSource(source);
213  setRenderer(renderer);
214 }
215 
216 
218 {
219  mData = data;
220  if (data)
221  mMapper->SetInputData(mData);
222 }
223 
224 void GraphicalGlyph3DData::setOrientationArray(const char* orientationArray)
225 {
226  mMapper->SetOrientationArray(orientationArray);
227 }
228 
229 void GraphicalGlyph3DData::setColorArray(const char* colorArray)
230 {
231  if(strlen(colorArray)>0)
232  {
233  setScalarVisibility(true);
234  }else
235  {
236  setScalarVisibility(false);
237  }
238  mMapper->SelectColorArray(colorArray);
239 }
240 
241 
242 void GraphicalGlyph3DData::setLUT(const char* lut)
243 {
244  vtkSmartPointer<vtkColorSeries> colorSeries = vtkSmartPointer<vtkColorSeries>::New();
245  vtkSmartPointer<vtkLookupTable> table = vtkLookupTable::New();
246  colorSeries->SetColorSchemeByName(lut);
247  colorSeries->BuildLookupTable(table , vtkColorSeries::ORDINAL);
248  mMapper->SetLookupTable(table);
249 }
250 
251 
252 void GraphicalGlyph3DData::setScaleFactor(double scaleFactor)
253 {
254  if(scaleFactor<=0) return;
255  mMapper->SetScaleFactor(scaleFactor);
256 }
257 
259 {
260  return mMapper;
261 }
262 
263 //--------------------------------------------------------
264 //--------------------------------------------------------
265 //--------------------------------------------------------
266 
268 {
269  // mRenderer = renderer;
270  source = vtkSphereSourcePtr::New();
271  source->SetRadius(4);
272  // default:
273  // source->SetThetaResolution(8);
274  // source->SetPhiResolution(8);
275  // 24*16 = 384, 8*8=64, 16*12=192
276  source->SetThetaResolution(16);
277  source->SetPhiResolution(12);
278  source->LatLongTessellationOn();
279 
280  vtkPolyDataNormalsPtr normals = vtkPolyDataNormalsPtr::New();
281  normals->SetInputConnection(source->GetOutputPort());
282  normals->Update();
283 
284  mapper = vtkPolyDataMapperPtr::New();
285  mapper->SetInputConnection(normals->GetOutputPort());
286 
287  actor = vtkActorPtr::New();
288  actor->SetMapper(mapper);
289 
290  this->setRenderer(renderer);
291 }
292 
294 {
295  this->setRenderer(NULL);
296 }
297 
299 {
300  if (mRenderer)
301  {
302  mRenderer->RemoveActor(actor);
303  }
304 
305  mRenderer = renderer;
306 
307  if (mRenderer)
308  {
309  mRenderer->AddActor(actor);
310  }
311 }
312 
313 void GraphicalPoint3D::setRadius(double radius)
314 {
315  source->SetRadius(radius);
316 }
317 
318 void GraphicalPoint3D::setColor(QColor color)
319 {
320  setColorAndOpacity(actor->GetProperty(), color);
321 }
322 
324 {
325  actor->SetPosition(point.begin());
326 }
327 
329 {
330  return Vector3D(actor->GetPosition());
331 }
332 
334 {
335  return actor;
336 }
337 
339 {
340  return source->GetOutput();
341 }
342 
343 //--------------------------------------------------------
344 //--------------------------------------------------------
345 //--------------------------------------------------------
346 
348 {
349  mRenderer = renderer;
350  source = vtkLineSourcePtr::New();
351  mapper = vtkPolyDataMapperPtr::New() ;
352  actor = vtkActorPtr::New() ;
353 
354  mapper->SetInputConnection( source->GetOutputPort() );
355  actor->SetMapper (mapper );
356  this->setRenderer(renderer);
357 }
358 
360 {
361  this->setRenderer(NULL);
362 }
363 
365 {
366  if (mRenderer)
367  {
368  mRenderer->RemoveActor(actor);
369  }
370 
371  mRenderer = renderer;
372 
373  if (mRenderer)
374  {
375  mRenderer->AddActor(actor);
376  }
377 }
378 
379 void GraphicalLine3D::setColor(QColor color)
380 {
381  setColorAndOpacity(actor->GetProperty(), color);
382 }
383 
385 {
386  source->SetPoint1(point1.begin());
387  source->SetPoint2(point2.begin());
388 }
389 
391 {
392  actor->GetProperty()->SetLineStipplePattern(stipple);
393 }
394 
396 {
397  return actor;
398 }
399 
400 //--------------------------------------------------------
401 //--------------------------------------------------------
402 //--------------------------------------------------------
403 
405 {
406  mRenderer = renderer;
407  source = vtkArcSourcePtr::New();
408  source->SetResolution(20);
409  mapper = vtkPolyDataMapperPtr::New() ;
410  actor = vtkActorPtr::New() ;
411 
412  mapper->SetInputConnection( source->GetOutputPort() );
413  actor->SetMapper (mapper );
414  if (mRenderer)
415  mRenderer->AddActor(actor);
416 }
417 
419 {
420  if (mRenderer)
421  mRenderer->RemoveActor(actor);
422 }
423 
424 void GraphicalArc3D::setColor(QColor color)
425 {
426  setColorAndOpacity(actor->GetProperty(), color);
427 }
428 
430 {
431  source->SetPoint1(point1.begin());
432  source->SetPoint2(point2.begin());
433  source->SetCenter(center.begin());
434 }
435 
436 void GraphicalArc3D::setStipple(int stipple)
437 {
438  actor->GetProperty()->SetLineStipplePattern(stipple);
439 }
440 
442 {
443  return actor;
444 }
445 
446 //--------------------------------------------------------
447 //--------------------------------------------------------
448 //--------------------------------------------------------
449 
451 {
452  mRenderer = renderer;
453  source = vtkArrowSourcePtr::New();
454  source->SetTipResolution(24);
455  source->SetShaftResolution(24);
456  mapper = vtkPolyDataMapperPtr::New() ;
457  actor = vtkActorPtr::New() ;
458 
459  mapper->SetInputConnection( source->GetOutputPort() );
460  actor->SetMapper (mapper );
461  if (mRenderer)
462  mRenderer->AddActor(actor);
463 }
464 
466 {
467  if (mRenderer)
468  mRenderer->RemoveActor(actor);
469 }
470 
471 void GraphicalArrow3D::setColor(QColor color)
472 {
473  setColorAndOpacity(actor->GetProperty(), color);
474 }
475 
477 {
478  // find an arbitrary vector k perpendicular to normal:
479  Vector3D k = cross(Vector3D(1,0,0), normal);
480  if (similar(k, Vector3D(0,0,0)))
481  k = cross(Vector3D(0,1,0), normal);
482  k = k.normalized();
483  Transform3D M = createTransformIJC(normal, k, base);
484 
485  // std::cout << "GraphicalArrow3D::setValue " << base << " - " << normal << std::endl;
487  M = M * S;
488  // let arrow shape increase slowly with length:
489  // source->SetTipLength(0.35/sqrt(length));
490  // source->SetTipRadius(0.1*sqrt(length));
491  // source->SetShaftRadius(0.03*sqrt(length));
492  source->SetTipLength(0.35);
493  source->SetTipRadius(0.1*(length));
494  source->SetShaftRadius(0.03*(length));
495  actor->SetUserMatrix(M.getVtkMatrix());
496 }
497 
498 //--------------------------------------------------------
499 //--------------------------------------------------------
500 //--------------------------------------------------------
501 
502 Rect3D::Rect3D(vtkRendererPtr renderer, QColor color)
503 {
504  mRenderer = renderer;
505  mapper = vtkPolyDataMapperPtr::New();
506  actor = vtkActorPtr::New();
507  setColorAndOpacity(actor->GetProperty(), color);
508  actor->SetMapper(mapper);
509  if (mRenderer)
510  mRenderer->AddActor(actor);
511 
512  mPolyData = vtkPolyDataPtr::New();
513  mPoints = vtkPointsPtr::New();
514  mSide = vtkCellArrayPtr::New();
515 
516  vtkIdType cells[5] = { 0,1,2,3,0 };
517  mSide->InsertNextCell(5, cells);
518 
519  mPolyData->SetPoints(mPoints);
520  mapper->SetInputData(mPolyData);
521 }
522 
523 void Rect3D::setLine(bool on, int width)
524 {
525  if (on)
526  {
527  mPolyData->SetLines(mSide);
528  actor->GetProperty()->SetLineWidth(width);
529  }
530  else
531  {
532  mPolyData->SetLines(NULL);
533  }
534 }
535 
536 void Rect3D::setSurface(bool on)
537 {
538  if (on)
539  {
540  mPolyData->SetPolys(mSide);
541  actor->GetProperty()->SetOpacity(1.0); // transparent planes dont work well together with texture volume. Use 1.0
542  }
543  else
544  {
545  mPolyData->SetPolys(NULL);
546  }
547 }
548 
550 {
551  if (mRenderer)
552  mRenderer->RemoveActor(actor);
553 }
554 
555 void Rect3D::setColor(QColor color)
556 {
557  setColorAndOpacity(actor->GetProperty(), color);
558 }
559 
561 {
562  mPoints = vtkPointsPtr::New();
563  mPoints->InsertPoint(0, M.coord(bb.corner(0,0,0)).begin());
564  mPoints->InsertPoint(1, M.coord(bb.corner(0,1,0)).begin());
565  mPoints->InsertPoint(2, M.coord(bb.corner(1,1,0)).begin());
566  mPoints->InsertPoint(3, M.coord(bb.corner(1,0,0)).begin());
567  mPolyData->SetPoints(mPoints);
568 }
569 
570 //--------------------------------------------------------
571 //--------------------------------------------------------
572 //--------------------------------------------------------
573 
575 {
576  mText = vtkVectorTextPtr::New();
577  vtkPolyDataMapperPtr mapper = vtkPolyDataMapperPtr::New();
578  mapper->SetInputConnection(mText->GetOutputPort());
579  mFollower = vtkFollowerPtr::New();
580  mFollower->SetMapper(mapper);
581  Vector3D mTextScale(2,2,2);
582  mFollower->SetScale(mTextScale.begin());
583 
584  this->setSizeInNormalizedViewport(true, 0.025);
585  this->setRenderer(renderer);
586 }
587 
589 {
590  if (mRenderer)
591  {
592  mRenderer->RemoveActor(mFollower);
593  mViewportListener->stopListen();
594  }
595 
596  mRenderer = renderer;
597 
598  if (mRenderer)
599  {
600  mRenderer->AddActor(mFollower);
601  mFollower->SetCamera(mRenderer->GetActiveCamera());
602  if (mViewportListener)
603  mViewportListener->startListen(mRenderer);
604  }
605 }
606 
608 {
609  if (mRenderer)
610  mRenderer->RemoveActor(mFollower);
611 }
612 
613 void FollowerText3D::setSize(double val)
614 {
615  mSize = val;
616  this->scaleText();
617 }
618 
620 {
621  if (on)
622  {
623  if (!mViewportListener)
624  {
625  mViewportListener.reset(new ViewportListener);
626  mViewportListener->setCallback(boost::bind(&FollowerText3D::scaleText, this));
627  }
628  }
629  else
630  {
631  mViewportListener.reset();
632  }
633 
634  this->setSize(size);
635 }
636 
637 void FollowerText3D::setColor(QColor color)
638 {
639  setColorAndOpacity(mFollower->GetProperty(), color);
640 }
641 
642 void FollowerText3D::setText(QString text)
643 {
644  mText->SetText(cstring_cast(text));
645 }
646 
648 {
649  mFollower->SetPosition(pos.begin());
650 }
651 
653 {
654  return mFollower;
655 }
656 
664 {
665  if (!mViewportListener || !mViewportListener->isListening())
666  {
667  mFollower->SetScale(Vector3D(mSize,mSize,mSize).begin());
668  return;
669  }
670 
671  double size = mViewportListener->getVpnZoom(Vector3D(mFollower->GetPosition()));
672 
673  double scale = mSize/size;
674  // std::cout << "s= " << size << " ,scale= " << scale << std::endl;
675  Vector3D mTextScale(scale,scale,scale);
676  if (mFollower)
677  mFollower->SetScale(mTextScale.begin());
678 }
679 
680 //--------------------------------------------------------
681 //--------------------------------------------------------
682 //--------------------------------------------------------
683 
685 {
686  mText = vtkCaptionActor2DPtr::New();
687  mText->BorderOff();
688  mText->LeaderOff();
689 
690  mText->GetCaptionTextProperty()->BoldOff();
691  mText->GetCaptionTextProperty()->ItalicOff();
692  mText->GetCaptionTextProperty()->ShadowOff();
693  mText->SetWidth(10);
694  mText->SetHeight(0.03);
695 
696  this->setRenderer(renderer);
697 }
698 
700 {
701  mText->SetPosition(-15, -30);
702  mText->SetPosition2(15, -10);
703 }
704 
706 {
707  mText->SetPosition(-15, 2);
708 }
709 
711 {
712  mText->SetVisibility(visible);
713 }
714 
716 {
717  if (mRenderer)
718  {
719  mRenderer->RemoveActor(mText);
720  }
721 
722  mRenderer = renderer;
723 
724  if (mRenderer)
725  {
726  mRenderer->AddActor(mText);
727  }
728 }
729 
731 {
732  if (mRenderer)
733  mRenderer->RemoveActor(mText);
734 }
735 
736 void CaptionText3D::setSize(double val)
737 {
738  mText->SetHeight(val);
739 }
740 
741 void CaptionText3D::setColor(QColor color)
742 {
743  mText->GetCaptionTextProperty()->SetColor(getColorAsVector3D(color).begin());
744 }
745 
746 void CaptionText3D::setText(QString text)
747 {
748  mText->SetCaption(cstring_cast(text));
749 }
750 
752 {
753  mPos = pos;
754  mText->SetAttachmentPoint(pos.begin());
755 }
756 
758 {
759  return mPos;
760 }
761 
763 {
764  return mText;
765 }
766 
767 //--------------------------------------------------------
768 //--------------------------------------------------------
769 //--------------------------------------------------------
770 
771 }
cx::GraphicalLine3D::getActor
vtkActorPtr getActor()
Definition: cxGraphicalPrimitives.cpp:395
cx::Rect3D::setSurface
void setSurface(bool on)
Definition: cxGraphicalPrimitives.cpp:536
cx::GraphicalGeometricBase::setPosition
void setPosition(Vector3D point)
Definition: cxGraphicalPrimitives.cpp:100
cx::Rect3D::Rect3D
Rect3D(vtkRendererPtr renderer, QColor color)
Definition: cxGraphicalPrimitives.cpp:502
vtkPolyDataNormalsPtr
vtkSmartPointer< class vtkPolyDataNormals > vtkPolyDataNormalsPtr
Definition: vtkForwardDeclarations.h:113
cx::CaptionText3D::setVisibility
void setVisibility(bool visible)
Definition: cxGraphicalPrimitives.cpp:710
cx::GraphicalLine3D::setValue
void setValue(Vector3D point1, Vector3D point2)
Definition: cxGraphicalPrimitives.cpp:384
cx::FollowerText3D::setRenderer
void setRenderer(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:588
cx::GraphicalArrow3D::setValue
void setValue(Vector3D base, Vector3D normal, double length)
Definition: cxGraphicalPrimitives.cpp:476
cx::GraphicalArc3D::getActor
vtkActorPtr getActor()
Definition: cxGraphicalPrimitives.cpp:441
cx::GraphicalGeometricBase::mSource
vtkPolyDataAlgorithmPtr mSource
Definition: cxGraphicalPrimitives.h:67
cx::FollowerText3D::setSize
void setSize(double val)
Definition: cxGraphicalPrimitives.cpp:613
cx::DoubleBoundingBox3D
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
Definition: cxBoundingBox3D.h:63
cx::GraphicalGlyph3DData::setScaleFactor
void setScaleFactor(double scaleFactor)
Definition: cxGraphicalPrimitives.cpp:252
cx::Rect3D::updatePosition
void updatePosition(const DoubleBoundingBox3D bb, const Transform3D &M)
Definition: cxGraphicalPrimitives.cpp:560
cx::GraphicalLine3D::GraphicalLine3D
GraphicalLine3D(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:347
vtkMapperPtr
vtkSmartPointer< class vtkMapper > vtkMapperPtr
Definition: vtkForwardDeclarations.h:89
cx::FollowerText3D::setSizeInNormalizedViewport
void setSizeInNormalizedViewport(bool on, double size)
Definition: cxGraphicalPrimitives.cpp:619
cx::GraphicalPolyData3D::setTexture
void setTexture(vtkTexturePtr texture)
Definition: cxGraphicalPrimitives.cpp:187
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::CaptionText3D::setSize
void setSize(double val)
Definition: cxGraphicalPrimitives.cpp:736
vtkFollowerPtr
vtkSmartPointer< class vtkFollower > vtkFollowerPtr
Definition: vtkForwardDeclarations.h:58
cx::ViewportListener
Listens to changes in viewport and camera matrix.
Definition: cxViewportListener.h:67
cx::createTransformScale
Transform3D createTransformScale(const Vector3D &scale_)
Definition: cxTransform3D.cpp:157
cx::DoubleBoundingBox3D::corner
Vector3D corner(int x, int y, int z) const
Definition: cxBoundingBox3D.cpp:208
cx::CaptionText3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:741
cx::GraphicalGeometricBase::setColor
void setColor(double red, double green, double blue)
Definition: cxGraphicalPrimitives.cpp:90
cx::CaptionText3D::setRenderer
void setRenderer(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:715
cx::GraphicalLine3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:379
cx::GraphicalGeometricBase::getSource
vtkPolyDataAlgorithmPtr getSource()
Definition: cxGraphicalPrimitives.cpp:155
cx::GraphicalPolyData3D::GraphicalPolyData3D
GraphicalPolyData3D(vtkPolyDataAlgorithmPtr source=vtkPolyDataAlgorithmPtr(), vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:164
begin
Scalar * begin()
Definition: cxPlainObjectEigenAddons.h:22
cx::GraphicalPolyData3D::setData
void setData(vtkPolyDataPtr data)
Definition: cxGraphicalPrimitives.cpp:179
cx::FollowerText3D::~FollowerText3D
~FollowerText3D()
Definition: cxGraphicalPrimitives.cpp:607
cx::GraphicalGeometricBase::setOpacity
void setOpacity(double val)
Definition: cxGraphicalPrimitives.cpp:105
cx::GraphicalPoint3D::GraphicalPoint3D
GraphicalPoint3D(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:267
cx::GraphicalPolyData3D::getMapper
vtkMapperPtr getMapper()
Definition: cxGraphicalPrimitives.cpp:193
cstring_cast
cstring_cast_Placeholder cstring_cast(const T &val)
Definition: cxTypeConversions.h:69
cxGraphicalPrimitives.h
vtkCaptionActor2DPtr
vtkSmartPointer< class vtkCaptionActor2D > vtkCaptionActor2DPtr
Definition: vtkForwardDeclarations.h:40
cx::GraphicalLine3D::setStipple
void setStipple(int stipple)
Definition: cxGraphicalPrimitives.cpp:390
cx::createTransformIJC
Transform3D createTransformIJC(const Vector3D &ivec, const Vector3D &jvec, const Vector3D &center)
Definition: cxTransform3D.cpp:255
cx::GraphicalArc3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:424
cx::GraphicalArrow3D::GraphicalArrow3D
GraphicalArrow3D(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:450
cx::GraphicalArrow3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:471
cx::GraphicalArrow3D::~GraphicalArrow3D
~GraphicalArrow3D()
Definition: cxGraphicalPrimitives.cpp:465
cx::GraphicalPoint3D::~GraphicalPoint3D
~GraphicalPoint3D()
Definition: cxGraphicalPrimitives.cpp:293
vtkPolyDataMapperPtr
vtkSmartPointer< class vtkPolyDataMapper > vtkPolyDataMapperPtr
Definition: vtkForwardDeclarations.h:112
cx::GraphicalGeometricBase::setScalarVisibility
void setScalarVisibility(bool show)
Definition: cxGraphicalPrimitives.cpp:122
cx::FollowerText3D::scaleText
void scaleText()
internal method
Definition: cxGraphicalPrimitives.cpp:663
cx::GraphicalPolyData3D::setIsWireFrame
void setIsWireFrame(bool val)
Definition: cxGraphicalPrimitives.cpp:174
cx::FollowerText3D::getActor
vtkFollowerPtr getActor()
Definition: cxGraphicalPrimitives.cpp:652
cxBoundingBox3D.h
cx::GraphicalPoint3D::getValue
Vector3D getValue() const
Definition: cxGraphicalPrimitives.cpp:328
cx::FollowerText3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:637
cx::GraphicalGeometricBase::mRenderer
vtkRendererPtr mRenderer
Definition: cxGraphicalPrimitives.h:71
cx::GraphicalGeometricBase::mActor
vtkActorPtr mActor
Definition: cxGraphicalPrimitives.h:69
cx::CaptionText3D::getPosition
Vector3D getPosition() const
Definition: cxGraphicalPrimitives.cpp:757
cx::GraphicalGlyph3DData::setOrientationArray
void setOrientationArray(const char *orientationArray)
Definition: cxGraphicalPrimitives.cpp:224
cx::GraphicalLine3D::setRenderer
void setRenderer(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:364
length
RealScalar length() const
Definition: cxMatrixBaseEigenAddons.h:35
cx::GraphicalGeometricBase::getPosition
Vector3D getPosition() const
Definition: cxGraphicalPrimitives.cpp:132
cx::GraphicalGeometricBase
Definition: cxGraphicalPrimitives.h:36
cx::setColorAndOpacity
void setColorAndOpacity(vtkPropertyOrProperty2DPtr property, QColor color)
Definition: cxVtkHelperClasses.h:34
cx::cross
Vector3D cross(const Vector3D &a, const Vector3D &b)
compute cross product of a and b.
Definition: cxVector3D.cpp:41
cx::Rect3D::~Rect3D
~Rect3D()
Definition: cxGraphicalPrimitives.cpp:549
cx::CaptionText3D::CaptionText3D
CaptionText3D(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:684
cx::GraphicalGeometricBase::setSource
void setSource(vtkPolyDataAlgorithmPtr source)
Definition: cxGraphicalPrimitives.cpp:52
cx::FollowerText3D::setText
void setText(QString text)
Definition: cxGraphicalPrimitives.cpp:642
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::GraphicalGeometricBase::setPointSize
void setPointSize(int pointSize)
Definition: cxGraphicalPrimitives.cpp:115
cx::GraphicalPoint3D::getPolyData
vtkPolyDataPtr getPolyData()
Definition: cxGraphicalPrimitives.cpp:338
cx::getColorAsVector3D
Vector3D getColorAsVector3D(QColor color)
Definition: cxVtkHelperClasses.cpp:40
cx::GraphicalGeometricBase::setBackfaceCulling
void setBackfaceCulling(bool val)
Definition: cxGraphicalPrimitives.cpp:80
cx::GraphicalGeometricBase::setVisibility
void setVisibility(bool visible)
Definition: cxGraphicalPrimitives.cpp:74
cx::GraphicalLine3D::~GraphicalLine3D
~GraphicalLine3D()
Definition: cxGraphicalPrimitives.cpp:359
cx::GraphicalGeometricBase::getProperty
vtkPropertyPtr getProperty()
Definition: cxGraphicalPrimitives.cpp:142
cxTypeConversions.h
cx::GraphicalPoint3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:318
cx::FollowerText3D::setPosition
void setPosition(Vector3D pos)
Definition: cxGraphicalPrimitives.cpp:647
cx::GraphicalPoint3D::setRadius
void setRadius(double radius)
Definition: cxGraphicalPrimitives.cpp:313
cx::GraphicalGeometricBase::~GraphicalGeometricBase
~GraphicalGeometricBase()
Definition: cxGraphicalPrimitives.cpp:47
cx::GraphicalPoint3D::getActor
vtkActorPtr getActor()
Definition: cxGraphicalPrimitives.cpp:333
cx::CaptionText3D::setPosition
void setPosition(Vector3D pos)
Definition: cxGraphicalPrimitives.cpp:751
cx::CaptionText3D::placeBelowCenter
void placeBelowCenter()
Definition: cxGraphicalPrimitives.cpp:699
cx::GraphicalPoint3D::setRenderer
void setRenderer(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:298
vtkPropertyPtr
vtkSmartPointer< class vtkProperty > vtkPropertyPtr
Definition: vtkForwardDeclarations.h:120
cx::GraphicalPoint3D::setValue
void setValue(Vector3D point)
Definition: cxGraphicalPrimitives.cpp:323
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cx::CaptionText3D::getActor
vtkCaptionActor2DPtr getActor()
Definition: cxGraphicalPrimitives.cpp:762
cx::GraphicalGlyph3DData::setLUT
void setLUT(const char *lut)
Definition: cxGraphicalPrimitives.cpp:242
vtkActorPtr
vtkSmartPointer< class vtkActor > vtkActorPtr
Definition: vtkForwardDeclarations.h:31
cx::GraphicalGeometricBase::mData
vtkPolyDataPtr mData
Definition: cxGraphicalPrimitives.h:70
vtkPolyDataAlgorithmPtr
vtkSmartPointer< class vtkPolyDataAlgorithm > vtkPolyDataAlgorithmPtr
Definition: cxViewWrapper.h:29
cx::GraphicalArc3D::~GraphicalArc3D
~GraphicalArc3D()
Definition: cxGraphicalPrimitives.cpp:418
cx::Rect3D::setLine
void setLine(bool on, int width)
Definition: cxGraphicalPrimitives.cpp:523
cx::GraphicalArc3D::setValue
void setValue(Vector3D point1, Vector3D point2, Vector3D center)
Definition: cxGraphicalPrimitives.cpp:429
cx::CaptionText3D::placeAboveCenter
void placeAboveCenter()
Definition: cxGraphicalPrimitives.cpp:705
cx::GraphicalGeometricBase::setScalarModeToUseCellData
void setScalarModeToUseCellData()
Definition: cxGraphicalPrimitives.cpp:127
cx::GraphicalGeometricBase::getMapper
virtual vtkMapperPtr getMapper()=0
normal
PlainObject normal() const
Definition: cxMatrixBaseEigenAddons.h:27
cx::GraphicalArc3D::setStipple
void setStipple(int stipple)
Definition: cxGraphicalPrimitives.cpp:436
vtkTexturePtr
vtkSmartPointer< class vtkTexture > vtkTexturePtr
Definition: vtkForwardDeclarations.h:140
cx::GraphicalGeometricBase::setUserMatrix
void setUserMatrix(vtkMatrix4x4 *matrix)
Definition: cxGraphicalPrimitives.cpp:110
cxVtkHelperClasses.h
cx::GraphicalArc3D::GraphicalArc3D
GraphicalArc3D(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:404
cx::FollowerText3D::FollowerText3D
FollowerText3D(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:574
cx::GraphicalGeometricBase::setFrontfaceCulling
void setFrontfaceCulling(bool val)
Definition: cxGraphicalPrimitives.cpp:85
cx::GraphicalGeometricBase::setRenderer
void setRenderer(vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:63
cx::CaptionText3D::~CaptionText3D
~CaptionText3D()
Definition: cxGraphicalPrimitives.cpp:730
cx::similar
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
Definition: cxCameraStyleForView.cpp:506
cx::GraphicalGeometricBase::getActor
vtkActorPtr getActor()
Definition: cxGraphicalPrimitives.cpp:137
cx::CaptionText3D::setText
void setText(QString text)
Definition: cxGraphicalPrimitives.cpp:746
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::Rect3D::setColor
void setColor(QColor color)
Definition: cxGraphicalPrimitives.cpp:555
vtkRendererPtr
vtkSmartPointer< class vtkRenderer > vtkRendererPtr
Definition: vtkForwardDeclarations.h:122
cx::GraphicalGeometricBase::GraphicalGeometricBase
GraphicalGeometricBase(vtkPolyDataAlgorithmPtr source=vtkPolyDataAlgorithmPtr(), vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:40
cx::GraphicalGeometricBase::getPolyData
vtkPolyDataPtr getPolyData()
Definition: cxGraphicalPrimitives.cpp:147
cx::GraphicalGlyph3DData::GraphicalGlyph3DData
GraphicalGlyph3DData(vtkPolyDataAlgorithmPtr source=vtkPolyDataAlgorithmPtr(), vtkRendererPtr renderer=vtkRendererPtr())
Definition: cxGraphicalPrimitives.cpp:202
cx::GraphicalGeometricBase::mProperty
vtkPropertyPtr mProperty
Definition: cxGraphicalPrimitives.h:68
cx::GraphicalGlyph3DData::setColorArray
void setColorArray(const char *colorArray)
Definition: cxGraphicalPrimitives.cpp:229
cx::GraphicalGlyph3DData::getMapper
vtkMapperPtr getMapper()
Definition: cxGraphicalPrimitives.cpp:258
cx::GraphicalGlyph3DData::setData
void setData(vtkPolyDataPtr data)
Definition: cxGraphicalPrimitives.cpp:217