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

Method ConnectMapperInput

Rendering/VolumeOpenGL2/vtkSmartVolumeMapper.cxx:736–777  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

734
735//------------------------------------------------------------------------------
736void vtkSmartVolumeMapper::ConnectMapperInput(vtkVolumeMapper* m)
737{
738 assert("pre: m_exists" && m != nullptr);
739
740 bool needShallowCopy = false;
741 vtkDataSet* data = m->GetInput();
742
743 if (data == nullptr || data == this->InputDataMagnitude)
744 {
745 if (vtkImageData::SafeDownCast(this->GetInput()))
746 {
747 if (vtkUniformGrid::SafeDownCast(this->GetInput()))
748 {
749 data = vtkUniformGrid::New();
750 }
751 else
752 {
753 data = vtkImageData::New();
754 }
755 }
756 else if (vtkRectilinearGrid::SafeDownCast(this->GetInput()))
757 {
758 data = vtkRectilinearGrid::New();
759 }
760 m->SetInputDataObject(data);
761 needShallowCopy = true;
762 data->Delete();
763 }
764 else
765 {
766 needShallowCopy =
767 ((this->LastInput != this->GetInput()) || (data->GetMTime() < this->GetInput()->GetMTime()));
768
769 m->SetInputDataObject(data);
770 }
771
772 if (needShallowCopy)
773 {
774 data->ShallowCopy(this->GetInput());
775 this->LastInput = this->GetInput();
776 }
777}
778
779//------------------------------------------------------------------------------
780void vtkSmartVolumeMapper::ConnectFilterInput(vtkImageResample* f)

Callers 2

ComputeRenderModeMethod · 0.95
SetupVectorModeMethod · 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