Skip to content

Commit 631bcde

Browse files
author
Adam Rankin
committed
re #1089: Fixed VTK5 build error
1 parent c7e5515 commit 631bcde

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

PlusLib/src/PlusUsSimulator/vtkPlusUsSimulatorAlgo.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,13 @@ int vtkPlusUsSimulatorAlgo::RequestData( vtkInformation* request, vtkInformation
186186
LOG_ERROR("vtkPlusUsSimulatorAlgo output type is invalid");
187187
return 0;
188188
}
189-
simulatedUsImage->SetDimensions(1, 1, 1);
190-
simulatedUsImage->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
191-
189+
#if (VTK_MAJOR_VERSION < 6)
190+
simulatedUsImage->SetScalarType( VTK_UNSIGNED_CHAR );
191+
simulatedUsImage->SetNumberOfScalarComponents( 1 );
192+
simulatedUsImage->AllocateScalars();
193+
#else
194+
simulatedUsImage->AllocateScalars( VTK_UNSIGNED_CHAR, 1 );
195+
#endif
192196
return 0;
193197
}
194198
vtkSmartPointer<vtkMatrix4x4> referenceToImageMatrix = vtkSmartPointer<vtkMatrix4x4>::New();

0 commit comments

Comments
 (0)