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

Method ConnectFilterInput

Rendering/VolumeOpenGL2/vtkSmartVolumeMapper.cxx:780–805  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

778
779//------------------------------------------------------------------------------
780void vtkSmartVolumeMapper::ConnectFilterInput(vtkImageResample* f)
781{
782 assert("pre: f_exists" && f != nullptr);
783
784 vtkImageData* input2 = static_cast<vtkImageData*>(f->GetInput());
785 bool needShallowCopy = false;
786 if (input2 == nullptr)
787 {
788 // make sure we not create a shallow copy each time to avoid
789 // performance penalty.
790 input2 = vtkImageData::New();
791 f->SetInputDataObject(input2);
792 input2->Delete();
793 needShallowCopy = true;
794 }
795 else
796 {
797 needShallowCopy = ((this->LastFilterInput != this->GetInput()) ||
798 (input2->GetMTime() < this->GetInput()->GetMTime()));
799 }
800 if (needShallowCopy)
801 {
802 input2->ShallowCopy(this->GetInput());
803 this->LastFilterInput = this->GetInput();
804 }
805}
806
807//------------------------------------------------------------------------------
808void vtkSmartVolumeMapper::SetRequestedRenderMode(int mode)

Callers 1

ComputeRenderModeMethod · 0.95

Calls 7

DeleteMethod · 0.65
assertFunction · 0.50
NewFunction · 0.50
GetInputMethod · 0.45
SetInputDataObjectMethod · 0.45
GetMTimeMethod · 0.45
ShallowCopyMethod · 0.45

Tested by

no test coverage detected