MCPcopy Create free account
hub / github.com/Geant4/geant4 / SetImage

Method SetImage

source/visualization/Vtk/src/G4VtkImagePipeline.cc:75–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void G4VtkImagePipeline::SetImage(const G4String& fileName)
76{
77 vtkNew<vtkImageReader2Factory> readerFactory;
78 vtkSmartPointer<vtkImageReader2> imageReader;
79 imageReader.TakeReference(readerFactory->CreateImageReader2(fileName.c_str()));
80 imageReader->SetFileName(fileName.c_str());
81 imageReader->Update();
82
83 vtkNew<vtkImageFlip> flip;
84 flip->SetInputConnection(imageReader->GetOutputPort());
85 flip->SetFilteredAxis(1);
86
87 actor->GetMapper()->SetInputConnection(flip->GetOutputPort());
88 AddFilter(imageReader);
89}
90
91void G4VtkImagePipeline::SetTransformation(const G4Transform3D& transformation)
92{

Callers 1

AddNonG4ObjectImageMethod · 0.80

Calls 3

c_strMethod · 0.80
SetFileNameMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected