| 21 | vtkStandardNewMacro(vtkMitkRectangleProp); |
| 22 | |
| 23 | vtkMitkRectangleProp::vtkMitkRectangleProp() |
| 24 | : m_Height(0), |
| 25 | m_Width(0), |
| 26 | m_OriginX(0), |
| 27 | m_OriginY(0), |
| 28 | m_PolyData(vtkSmartPointer<vtkPolyData>::New()) |
| 29 | { |
| 30 | auto points = vtkSmartPointer<vtkPoints>::New(); |
| 31 | m_PolyData->SetPoints(points); |
| 32 | |
| 33 | auto lines = vtkSmartPointer<vtkCellArray>::New(); |
| 34 | m_PolyData->SetLines(lines); |
| 35 | |
| 36 | auto mapper = vtkSmartPointer<vtkPolyDataMapper2D>::New(); |
| 37 | |
| 38 | auto transformCoordinate = vtkSmartPointer<vtkCoordinate>::New(); |
| 39 | transformCoordinate->SetCoordinateSystemToDisplay(); |
| 40 | mapper->SetTransformCoordinate(transformCoordinate); |
| 41 | |
| 42 | this->CreateRectangle(); |
| 43 | |
| 44 | mapper->SetInputData(m_PolyData); |
| 45 | this->SetMapper(mapper); |
| 46 | |
| 47 | this->GetProperty()->SetLineWidth(2); |
| 48 | } |
| 49 | |
| 50 | vtkMitkRectangleProp::~vtkMitkRectangleProp() |
| 51 | { |
nothing calls this directly
no test coverage detected