| 34 | vtkStandardNewMacro(vtkMultiVolume); |
| 35 | |
| 36 | void 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 | |
| 57 | void vtkMultiVolume::SetAllVolumes(std::unordered_map<int, vtkVolume*>& volumes) |
| 58 | { |