MCPcopy Create free account
hub / github.com/Kitware/VTK / SetVolume

Method SetVolume

Rendering/Volume/vtkMultiVolume.cxx:36–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34vtkStandardNewMacro(vtkMultiVolume);
35
36void vtkMultiVolume::SetVolume(vtkVolume* vol, int port)
37{
38 auto currentVol = this->FindVolume(port);
39 if (currentVol != vol)
40 {
41 if (currentVol)
42 {
43 currentVol->UnRegister(this);
44 this->Volumes.erase(port);
45 }
46
47 if (vol)
48 {
49 this->Volumes[port] = vol;
50 vol->Register(this);
51 }
52
53 this->Modified();
54 }
55}
56
57void vtkMultiVolume::SetAllVolumes(std::unordered_map<int, vtkVolume*>& volumes)
58{

Callers 5

SetAllVolumesMethod · 0.95
ShallowCopyMethod · 0.95
UnitTestImplicitVolumeFunction · 0.45
RemoveVolumeFunction · 0.45

Calls 5

FindVolumeMethod · 0.95
UnRegisterMethod · 0.45
eraseMethod · 0.45
RegisterMethod · 0.45
ModifiedMethod · 0.45

Tested by 2

UnitTestImplicitVolumeFunction · 0.36