void SoVtkOutlineFilter::inputChanged(SoField * f)
{
	// Get the InputArrayToProcess value
	if ( f == &InputArrayToProcess )
	{
		SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
		SoInput input;
		int val0;
		int val1;
		int val2;
		int val3;
		SbString val4;
	
		input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
		input.read(val0);
		input.read(val1);
		input.read(val2);
		input.read(val3);
		input.read(val4);
		mObject->SetInputArrayToProcess( 
			(int) val0,
			(int) val1,
			(int) val2,
			(int) val3,
			val4.getString()
		);
	}
	//mObject->Update();
	
}
Example #2
0
void SoVtkFieldData::reset()
{
    mObject->UnRegister(0);
    mObject->Delete();
    mObject = 0;
    mObject = vtkFieldData::New();
    mObject->Register(0);
    mObject->SetGlobalWarningDisplay(0);
    // Get the input type(s)
    // Get the Component value
    if (addCalled == 1)
    {
        SbVariant *vComponent = (SbVariant *)Component.getValues(0);
        SoInput input;
        int nb_fields = Component.getNum();

        vtkIdType val0;
        int val1;
        double val2;
        for (int i=0; i < nb_fields; i++)
        {
            input.setBuffer((void *)vComponent[i].getField().getString(),256);
            input.read(val0);
            input.read(val1);
            input.read(val2);
            mObject->SetComponent(
                (const vtkIdType) val0,
                (const int) val1,
                (const double) val2
            );
        }
    }

}
Example #3
0
void SoVtkFieldData::inputChanged(SoField * f)
{
    // Get the Component value
    if ( f == &Component )
    {
        SbVariant *vComponent = (SbVariant *)Component.getValues(0);
        SoInput input;
        int nb_fields = Component.getNum();

        vtkIdType val0;
        int val1;
        double val2;
        for (int i=0; i < nb_fields; i++)
        {
            input.setBuffer((void *)vComponent[i].getField().getString(),256);
            input.read(val0);
            input.read(val1);
            input.read(val2);
            mObject->SetComponent(
                (const vtkIdType) val0,
                (const int) val1,
                (const double) val2
            );
        }
    }

}
void SoVtkImageVariance3D::inputChanged(SoField * f)
{
	// Get the KernelSize value
	if ( f == &KernelSize )
	{
		SbVariant *vKernelSize = (SbVariant *)KernelSize.getValues(0);
		SoInput input;
		int nb_fields = KernelSize.getNum();

		int val0;
		int val1;
		int val2;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vKernelSize[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			mObject->SetKernelSize( 
				(int) val0,
				(int) val1,
				(int) val2
			);
		}
	}

	// Get the NumberOfThreads value
	if ( f == &NumberOfThreads )
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);

	mObject->Update();
}
void SoVtkConeSource::inputChanged(SoField * f)
{
	// Get the Radius value
	if ( f == &Radius )
		SO_VTK_SET_FIELD_VALUE( mObject, Radius);

	// Get the Height value
	if ( f == &Height )
		SO_VTK_SET_FIELD_VALUE( mObject, Height);

	// Get the Capping value
	if ( f == &Capping )
		SO_VTK_SET_FIELD_VALUE( mObject, Capping);

	// Get the Direction value
	if ( f == &Direction )
		SO_VTK_SET_FIELD_VEC3F( mObject, Direction);

	// Get the Center value
	if ( f == &Center )
		SO_VTK_SET_FIELD_VEC3F( mObject, Center);

	// Get the Resolution value
	if ( f == &Resolution )
		SO_VTK_SET_FIELD_VALUE( mObject, Resolution);

	// Get the Angle value
	if ( f == &Angle )
		SO_VTK_SET_FIELD_VALUE( mObject, Angle);

	// Get the InputArrayToProcess value
	if ( f == &InputArrayToProcess )
	{
		SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
		SoInput input;
		int val0;
		int val1;
		int val2;
		int val3;
		SbString val4;
	
		input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
		input.read(val0);
		input.read(val1);
		input.read(val2);
		input.read(val3);
		input.read(val4);
		mObject->SetInputArrayToProcess( 
			(int) val0,
			(int) val1,
			(int) val2,
			(int) val3,
			val4.getString()
		);
	}
	//mObject->Update();
	
}
void SoVtkImageWrapPad::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkImageWrapPad::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the OutputNumberOfScalarComponents value
	
		SO_VTK_SET_FIELD_VALUE( mObject, OutputNumberOfScalarComponents);

	// Get the NumberOfThreads value
	
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);

	// Get the OutputWholeExtent value
	if (addCalled == 1)
	{
		SbVariant *vOutputWholeExtent = (SbVariant *)OutputWholeExtent.getValues(0);
		SoInput input;
		int nb_fields = OutputWholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vOutputWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetOutputWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	mObject->Update();
}
void SoVtkImageEllipsoidSource::inputChanged(SoField * f)
{
	// Get the Radius value
	if ( f == &Radius )
		SO_VTK_SET_FIELD_VEC3F( mObject, Radius);

	// Get the OutputScalarType value
	if ( f == &OutputScalarType )
		SO_VTK_SET_FIELD_VALUE( mObject, OutputScalarType);

	// Get the OutValue value
	if ( f == &OutValue )
		SO_VTK_SET_FIELD_VALUE( mObject, OutValue);

	// Get the InValue value
	if ( f == &InValue )
		SO_VTK_SET_FIELD_VALUE( mObject, InValue);

	// Get the Center value
	if ( f == &Center )
		SO_VTK_SET_FIELD_VEC3F( mObject, Center);

	// Get the WholeExtent value
	if ( f == &WholeExtent )
	{
		SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
		SoInput input;
		int nb_fields = WholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	mObject->Update();
}
void SoVtkGeometryFilter::inputChanged(SoField * f)
{
	// Get the CellClipping value
	if ( f == &CellClipping )
		SO_VTK_SET_FIELD_VALUE( mObject, CellClipping);

	// Get the Locator value
	if ( f == &Locator )
		SO_VTK_SET_FIELD_DATA( mObject, Locator, vtkPointLocator);

	// Get the PointClipping value
	if ( f == &PointClipping )
		SO_VTK_SET_FIELD_VALUE( mObject, PointClipping);

	// Get the ExtentClipping value
	if ( f == &ExtentClipping )
		SO_VTK_SET_FIELD_VALUE( mObject, ExtentClipping);

	// Get the Merging value
	if ( f == &Merging )
		SO_VTK_SET_FIELD_VALUE( mObject, Merging);

	// Get the Extent value
	if ( f == &Extent )
	{
		SbVariant *vExtent = (SbVariant *)Extent.getValues(0);
		SoInput input;
		int nb_fields = Extent.getNum();

		double val0;
		double val1;
		double val2;
		double val3;
		double val4;
		double val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetExtent( 
				(double) val0,
				(double) val1,
				(double) val2,
				(double) val3,
				(double) val4,
				(double) val5
			);
		}
	}

	mObject->Update();
}
void SoVtkImageAccumulate::inputChanged(SoField * f)
{
	// Get the ReverseStencil value
	if ( f == &ReverseStencil )
		SO_VTK_SET_FIELD_VALUE( mObject, ReverseStencil);

	// Get the ComponentExtent value
	if ( f == &ComponentExtent )
	{
		SbVariant *vComponentExtent = (SbVariant *)ComponentExtent.getValues(0);
		SoInput input;
		int nb_fields = ComponentExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vComponentExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetComponentExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	// Get the Stencil value
	if ( f == &Stencil )
		SO_VTK_SET_FIELD_DATA( mObject, Stencil, vtkImageStencilData);

	// Get the ComponentSpacing value
	if ( f == &ComponentSpacing )
		SO_VTK_SET_FIELD_VEC3F( mObject, ComponentSpacing);

	// Get the ComponentOrigin value
	if ( f == &ComponentOrigin )
		SO_VTK_SET_FIELD_VEC3F( mObject, ComponentOrigin);

	mObject->Update();
}
void SoVtkExtractGrid::inputChanged(SoField * f)
{
	// Get the VOI value
	if ( f == &VOI )
	{
		if ( VOI.getNum() >= 6)
		{
			SO_VTK_SET_FIELD_MFINT32( mObject, VOI);
		}
		else
		{
			SoDebugError::post( __FILE__, "This field must have 6 values." );
		}
	}

	// Get the SampleRate value
	if ( f == &SampleRate )
		SO_VTK_SET_FIELD_VEC3F( mObject, SampleRate);

	// Get the InputArrayToProcess value
	if ( f == &InputArrayToProcess )
	{
		SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
		SoInput input;
		int val0;
		int val1;
		int val2;
		int val3;
		SbString val4;
	
		input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
		input.read(val0);
		input.read(val1);
		input.read(val2);
		input.read(val3);
		input.read(val4);
		mObject->SetInputArrayToProcess( 
			(int) val0,
			(int) val1,
			(int) val2,
			(int) val3,
			val4.getString()
		);
	}
	// Get the IncludeBoundary value
	if ( f == &IncludeBoundary )
		SO_VTK_SET_FIELD_VALUE( mObject, IncludeBoundary);

	//mObject->Update();
	
}
void SoVtkImageGaussianSource::inputChanged(SoField * f)
{
	// Get the Maximum value
	if ( f == &Maximum )
		SO_VTK_SET_FIELD_VALUE( mObject, Maximum);

	// Get the StandardDeviation value
	if ( f == &StandardDeviation )
		SO_VTK_SET_FIELD_VALUE( mObject, StandardDeviation);

	// Get the Center value
	if ( f == &Center )
		SO_VTK_SET_FIELD_VEC3F( mObject, Center);

	// Get the WholeExtent value
	if ( f == &WholeExtent )
	{
		SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
		SoInput input;
		int nb_fields = WholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	mObject->Update();
}
void SoVtkImageDataGeometryFilter::inputChanged(SoField * f)
{
	// Get the OutputTriangles value
	if ( f == &OutputTriangles )
		SO_VTK_SET_FIELD_VALUE( mObject, OutputTriangles);

	// Get the Extent value
	if ( f == &Extent )
	{
		SbVariant *vExtent = (SbVariant *)Extent.getValues(0);
		SoInput input;
		int nb_fields = Extent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	// Get the ThresholdCells value
	if ( f == &ThresholdCells )
		SO_VTK_SET_FIELD_VALUE( mObject, ThresholdCells);

	// Get the ThresholdValue value
	if ( f == &ThresholdValue )
		SO_VTK_SET_FIELD_VALUE( mObject, ThresholdValue);

	mObject->Update();
}
Example #13
0
void SoVtkHull::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkHull::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the Planes value
	
		SO_VTK_SET_FIELD_DATA( mObject, Planes, vtkPlanes);

	// Get the Plane value
	if (addCalled == 1)
	{
		SbVariant *vPlane = (SbVariant *)Plane.getValues(0);
		SoInput input;
		int nb_fields = Plane.getNum();

		double val0;
		double val1;
		double val2;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vPlane[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			mObject->AddPlane( 
				(double) val0,
				(double) val1,
				(double) val2
			);
		}
	}

	// Get the RecursiveSpherePlanes value
	
		SO_VTK_ADD_FIELD_VALUE( mObject, RecursiveSpherePlanes);

	mObject->Update();
}
void SoVtkGenericProbeFilter::inputChanged(SoField * f)
{
	// Get the Source value
	if ( f == &Source )
		SO_VTK_SET_FIELD_DATA( mObject, Source, vtkGenericDataSet);

	// Get the NumberOfInputConnections value
	if ( f == &NumberOfInputConnections )
	{
		SbVariant *vNumberOfInputConnections = (SbVariant *)NumberOfInputConnections.getValues(0);
		SoInput input;
		int nb_fields = NumberOfInputConnections.getNum();

		int val0;
		int val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vNumberOfInputConnections[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			//mObject->SetNumberOfInputConnections( (int) val0, (int) val1 );
		}
	}

	mObject->Update();
}
void SoVtkImageWrapPad::inputChanged(SoField * f)
{
	// Get the OutputNumberOfScalarComponents value
	if ( f == &OutputNumberOfScalarComponents )
		SO_VTK_SET_FIELD_VALUE( mObject, OutputNumberOfScalarComponents);

	// Get the NumberOfThreads value
	if ( f == &NumberOfThreads )
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);

	// Get the OutputWholeExtent value
	if ( f == &OutputWholeExtent )
	{
		SbVariant *vOutputWholeExtent = (SbVariant *)OutputWholeExtent.getValues(0);
		SoInput input;
		int nb_fields = OutputWholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vOutputWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetOutputWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	mObject->Update();
}
void SoVtkImageVariance3D::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkImageVariance3D::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the KernelSize value
	if (addCalled == 1)
	{
		SbVariant *vKernelSize = (SbVariant *)KernelSize.getValues(0);
		SoInput input;
		int nb_fields = KernelSize.getNum();

		int val0;
		int val1;
		int val2;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vKernelSize[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			mObject->SetKernelSize( 
				(int) val0,
				(int) val1,
				(int) val2
			);
		}
	}

	// Get the NumberOfThreads value
	
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);

	mObject->Update();
}
void SoVtkEnSightGoldReader::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkEnSightGoldReader::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the ByteOrder value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ByteOrder);

	// Get the TimeValue value
	
		SO_VTK_SET_FIELD_VALUE( mObject, TimeValue);

	// Get the FilePath value
	
		SO_VTK_SET_FIELD_MFSTRING( mObject, FilePath);

	// Get the NumberOfInputConnections value
	if (addCalled == 1)
	{
		SbVariant *vNumberOfInputConnections = (SbVariant *)NumberOfInputConnections.getValues(0);
		SoInput input;
		int nb_fields = NumberOfInputConnections.getNum();

		int val0;
		int val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vNumberOfInputConnections[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			//mObject->SetNumberOfInputConnections( (int) val0, (int) val1 );
		}
	}

	// Get the CaseFileName value
	
		SO_VTK_SET_FIELD_MFSTRING( mObject, CaseFileName);

	// Get the ReadAllVariables value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ReadAllVariables);

	mObject->Update();
}
Example #18
0
void SoVtkImageBlend::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkImageBlend::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the Stencil value
	
		SO_VTK_SET_FIELD_DATA( mObject, Stencil, vtkImageStencilData);

	// Get the CompoundThreshold value
	
		SO_VTK_SET_FIELD_VALUE( mObject, CompoundThreshold);

	// Get the NumberOfThreads value
	
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);

	// Get the Opacity value
	if (addCalled == 1)
	{
		SbVariant *vOpacity = (SbVariant *)Opacity.getValues(0);
		SoInput input;
		int nb_fields = Opacity.getNum();

		int val0;
		double val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vOpacity[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			mObject->SetOpacity( 
				(int) val0,
				(double) val1
			);
		}
	}

	// Get the BlendMode value
	
		SO_VTK_SET_FIELD_VALUE( mObject, BlendMode);

	mObject->Update();
}
void SoVtkContourGrid::inputChanged(SoField * f)
{
	// Get the NumberOfContours value
	if ( f == &NumberOfContours )
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfContours);

	// Get the Value value
	if ( f == &Value )
	{
		SbVariant *vValue = (SbVariant *)Value.getValues(0);
		SoInput input;
		int nb_fields = Value.getNum();

		int val0;
		double val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vValue[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			mObject->SetValue( 
				(int) val0,
				(double) val1
			);
		}
	}

	// Get the ComputeScalars value
	if ( f == &ComputeScalars )
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeScalars);

	// Get the UseScalarTree value
	if ( f == &UseScalarTree )
		SO_VTK_SET_FIELD_VALUE( mObject, UseScalarTree);

	// Get the ComputeGradients value
	if ( f == &ComputeGradients )
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeGradients);

	// Get the Locator value
	if ( f == &Locator )
		SO_VTK_SET_FIELD_DATA( mObject, Locator, vtkPointLocator);

	// Get the ComputeNormals value
	if ( f == &ComputeNormals )
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeNormals);

	mObject->Update();
}
void SoVtkEnSightGoldBinaryReader::inputChanged(SoField * f)
{
	// Get the ByteOrder value
	if ( f == &ByteOrder )
		SO_VTK_SET_FIELD_VALUE( mObject, ByteOrder);

	// Get the TimeValue value
	if ( f == &TimeValue )
		SO_VTK_SET_FIELD_VALUE( mObject, TimeValue);

	// Get the FilePath value
	if ( f == &FilePath )
		SO_VTK_SET_FIELD_MFSTRING( mObject, FilePath);

	// Get the NumberOfInputConnections value
	if ( f == &NumberOfInputConnections )
	{
		SbVariant *vNumberOfInputConnections = (SbVariant *)
		  NumberOfInputConnections.getValues(0);

		SoInput input;
		int nb_fields = NumberOfInputConnections.getNum();

		int val0;
		int val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vNumberOfInputConnections[i].getField().
			  getString(),256);

			input.read(val0);
			input.read(val1);

			//mObject->SetNumberOfInputConnections( (int) val0, (int) val1 );
		}
	}

	// Get the CaseFileName value
	if ( f == &CaseFileName )
		SO_VTK_SET_FIELD_MFSTRING( mObject, CaseFileName);

	// Get the ReadAllVariables value
	if ( f == &ReadAllVariables )
		SO_VTK_SET_FIELD_VALUE( mObject, ReadAllVariables);

	mObject->Update();
}
void SoVtkGenericProbeFilter::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkGenericProbeFilter::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkObject *inputPtr = Input.getValue();
	
	if (inputPtr && inputPtr->getPointer()->IsA("vtkDataSet"))
		mObject->SetInput(vtkDataSet::SafeDownCast(inputPtr->getPointer()));

	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the Source value
	
		SO_VTK_SET_FIELD_DATA( mObject, Source, vtkGenericDataSet);

	// Get the NumberOfInputConnections value
	if (addCalled == 1)
	{
		SbVariant *vNumberOfInputConnections = (SbVariant *)NumberOfInputConnections.getValues(0);
		SoInput input;
		int nb_fields = NumberOfInputConnections.getNum();

		int val0;
		int val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vNumberOfInputConnections[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			//mObject->SetNumberOfInputConnections( (int) val0, (int) val1 );
		}
	}

	mObject->Update();
}
Example #22
0
void SoVtkImageBlend::inputChanged(SoField * f)
{
	// Get the Stencil value
	if ( f == &Stencil )
		SO_VTK_SET_FIELD_DATA( mObject, Stencil, vtkImageStencilData);

	// Get the CompoundThreshold value
	if ( f == &CompoundThreshold )
		SO_VTK_SET_FIELD_VALUE( mObject, CompoundThreshold);

	// Get the NumberOfThreads value
	if ( f == &NumberOfThreads )
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfThreads);

	// Get the Opacity value
	if ( f == &Opacity )
	{
		SbVariant *vOpacity = (SbVariant *)Opacity.getValues(0);
		SoInput input;
		int nb_fields = Opacity.getNum();

		int val0;
		double val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vOpacity[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			mObject->SetOpacity( 
				(int) val0,
				(double) val1
			);
		}
	}

	// Get the BlendMode value
	if ( f == &BlendMode )
		SO_VTK_SET_FIELD_VALUE( mObject, BlendMode);

	mObject->Update();
}
void SoVtkImageGaussianSource::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkImageGaussianSource::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the Maximum value
	
		SO_VTK_SET_FIELD_VALUE( mObject, Maximum);

	// Get the StandardDeviation value
	
		SO_VTK_SET_FIELD_VALUE( mObject, StandardDeviation);

	// Get the Center value
	
		SO_VTK_SET_FIELD_VEC3F( mObject, Center);

	// Get the WholeExtent value
	if (addCalled == 1)
	{
		SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
		SoInput input;
		int nb_fields = WholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	mObject->Update();
}
void SoVtkImageAccumulate::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkImageAccumulate::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the ReverseStencil value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ReverseStencil);

	// Get the ComponentExtent value
	if (addCalled == 1)
	{
		SbVariant *vComponentExtent = (SbVariant *)ComponentExtent.getValues(0);
		SoInput input;
		int nb_fields = ComponentExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vComponentExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetComponentExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	// Get the Stencil value
	
		SO_VTK_SET_FIELD_DATA( mObject, Stencil, vtkImageStencilData);

	// Get the ComponentSpacing value
	
		SO_VTK_SET_FIELD_VEC3F( mObject, ComponentSpacing);

	// Get the ComponentOrigin value
	
		SO_VTK_SET_FIELD_VEC3F( mObject, ComponentOrigin);

	mObject->Update();
}
void SoVtkContourFilter::inputChanged(SoField * f)
{
	// Get the NumberOfContours value
	if ( f == &NumberOfContours )
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfContours);

	// Get the Value value
	if ( f == &Value )
	{
		SbVariant vValue = (SbVariant)Value.getValue();
		SoInput input;
		int val0;
		double val1;
	
		input.setBuffer((void *)vValue.getField().getString(),256);
		input.read(val0);
		input.read(val1);
		mObject->SetValue( (int) val0, (double) val1 );
	}
	// Get the ComputeScalars value
	if ( f == &ComputeScalars )
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeScalars);

	// Get the UseScalarTree value
	if ( f == &UseScalarTree )
		SO_VTK_SET_FIELD_VALUE( mObject, UseScalarTree);

	// Get the ScalarTree value
	if ( f == &ScalarTree )
		SO_VTK_SET_FIELD_DATA( mObject, ScalarTree, vtkScalarTree);

	// Get the ComputeGradients value
	if ( f == &ComputeGradients )
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeGradients);

	// Get the Locator value
	if ( f == &Locator )
		SO_VTK_SET_FIELD_DATA( mObject, Locator, vtkPointLocator);

	// Get the InputArrayToProcess value
	if ( f == &InputArrayToProcess )
	{
		SbVariant vInputArrayToProcess = (SbVariant)InputArrayToProcess.getValue();
		SoInput input;
		int val0;
		int val1;
		int val2;
		int val3;
		SbString val4;
	
		input.setBuffer((void *)vInputArrayToProcess.getField().getString(),256);
		input.read(val0);
		input.read(val1);
		input.read(val2);
		input.read(val3);
		input.read(val4);
		mObject->SetInputArrayToProcess( 
			(int) val0,
			(int) val1,
			(int) val2,
			(int) val3,
			val4.getString()
		);
	}
	// Get the ComputeNormals value
	if ( f == &ComputeNormals )
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeNormals);

	//mObject->Update();
	
}
void SoVtkContourGrid::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkContourGrid::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the NumberOfContours value
	
		SO_VTK_SET_FIELD_VALUE( mObject, NumberOfContours);

	// Get the Value value
	if (addCalled == 1)
	{
		SbVariant *vValue = (SbVariant *)Value.getValues(0);
		SoInput input;
		int nb_fields = Value.getNum();

		int val0;
		double val1;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vValue[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			mObject->SetValue( 
				(int) val0,
				(double) val1
			);
		}
	}

	// Get the ComputeScalars value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeScalars);

	// Get the UseScalarTree value
	
		SO_VTK_SET_FIELD_VALUE( mObject, UseScalarTree);

	// Get the ComputeGradients value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeGradients);

	// Get the Locator value
	
		SO_VTK_SET_FIELD_DATA( mObject, Locator, vtkPointLocator);

	// Get the ComputeNormals value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ComputeNormals);

	mObject->Update();
}
Example #27
0
void SoVtkDataObject::inputChanged(SoField * f)
{
	// Get the FieldData value
	if ( f == &FieldData )
		SO_VTK_SET_FIELD_DATA( mObject, FieldData, vtkFieldData);

	// Get the ExtentTranslator value
	if ( f == &ExtentTranslator )
		SO_VTK_SET_FIELD_DATA( mObject, ExtentTranslator, vtkExtentTranslator);

	// Get the MaximumNumberOfPieces value
	if ( f == &MaximumNumberOfPieces )
		SO_VTK_SET_FIELD_VALUE( mObject, MaximumNumberOfPieces);

	// Get the RequestExactExtent value
	if ( f == &RequestExactExtent )
		SO_VTK_SET_FIELD_VALUE( mObject, RequestExactExtent);

	// Get the UpdatePiece value
	if ( f == &UpdatePiece )
		SO_VTK_SET_FIELD_VALUE( mObject, UpdatePiece);

	// Get the UpdateExtent value
	if ( f == &UpdateExtent )
	{
		SbVariant *vUpdateExtent = (SbVariant *)UpdateExtent.getValues(0);
		SoInput input;
		int nb_fields = UpdateExtent.getNum();

		int val0;
		int val1;
		int val2;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vUpdateExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			mObject->SetUpdateExtent( 
				(int) val0,
				(int) val1,
				(int) val2
			);
		}
	}

	// Get the WholeBoundingBox value
	if ( f == &WholeBoundingBox )
	{
		SbVariant *vWholeBoundingBox = (SbVariant *)WholeBoundingBox.getValues(0);
		SoInput input;
		int nb_fields = WholeBoundingBox.getNum();

		double val0;
		double val1;
		double val2;
		double val3;
		double val4;
		double val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeBoundingBox[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeBoundingBox( 
				(double) val0,
				(double) val1,
				(double) val2,
				(double) val3,
				(double) val4,
				(double) val5
			);
		}
	}

	// Get the UpdateGhostLevel value
	if ( f == &UpdateGhostLevel )
		SO_VTK_SET_FIELD_VALUE( mObject, UpdateGhostLevel);

	// Get the UpdateNumberOfPieces value
	if ( f == &UpdateNumberOfPieces )
		SO_VTK_SET_FIELD_VALUE( mObject, UpdateNumberOfPieces);

	// Get the WholeExtent value
	if ( f == &WholeExtent )
	{
		SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
		SoInput input;
		int nb_fields = WholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	// Get the Source value
	if ( f == &Source )
		SO_VTK_SET_FIELD_DATA( mObject, Source, vtkSource);

	// Get the PipelineInformation value
	if ( f == &PipelineInformation )
		SO_VTK_SET_FIELD_DATA( mObject, PipelineInformation, vtkInformation);

	mObject->Update();
}
Example #28
0
void SoVtkDataObject::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkDataObject::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	// Get the FieldData value
	
		SO_VTK_SET_FIELD_DATA( mObject, FieldData, vtkFieldData);

	// Get the ExtentTranslator value
	
		SO_VTK_SET_FIELD_DATA( mObject, ExtentTranslator, vtkExtentTranslator);

	// Get the MaximumNumberOfPieces value
	
		SO_VTK_SET_FIELD_VALUE( mObject, MaximumNumberOfPieces);

	// Get the RequestExactExtent value
	
		SO_VTK_SET_FIELD_VALUE( mObject, RequestExactExtent);

	// Get the UpdatePiece value
	
		SO_VTK_SET_FIELD_VALUE( mObject, UpdatePiece);

	// Get the UpdateExtent value
	if (addCalled == 1)
	{
		SbVariant *vUpdateExtent = (SbVariant *)UpdateExtent.getValues(0);
		SoInput input;
		int nb_fields = UpdateExtent.getNum();

		int val0;
		int val1;
		int val2;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vUpdateExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			mObject->SetUpdateExtent( 
				(int) val0,
				(int) val1,
				(int) val2
			);
		}
	}

	// Get the WholeBoundingBox value
	if (addCalled == 1)
	{
		SbVariant *vWholeBoundingBox = (SbVariant *)WholeBoundingBox.getValues(0);
		SoInput input;
		int nb_fields = WholeBoundingBox.getNum();

		double val0;
		double val1;
		double val2;
		double val3;
		double val4;
		double val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeBoundingBox[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeBoundingBox( 
				(double) val0,
				(double) val1,
				(double) val2,
				(double) val3,
				(double) val4,
				(double) val5
			);
		}
	}

	// Get the UpdateGhostLevel value
	
		SO_VTK_SET_FIELD_VALUE( mObject, UpdateGhostLevel);

	// Get the UpdateNumberOfPieces value
	
		SO_VTK_SET_FIELD_VALUE( mObject, UpdateNumberOfPieces);

	// Get the WholeExtent value
	if (addCalled == 1)
	{
		SbVariant *vWholeExtent = (SbVariant *)WholeExtent.getValues(0);
		SoInput input;
		int nb_fields = WholeExtent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vWholeExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetWholeExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	// Get the Source value
	
		SO_VTK_SET_FIELD_DATA( mObject, Source, vtkSource);

	// Get the PipelineInformation value
	
		SO_VTK_SET_FIELD_DATA( mObject, PipelineInformation, vtkInformation);

	mObject->Update();
}
void SoVtkImageDataGeometryFilter::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkImageDataGeometryFilter::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the OutputTriangles value
	
		SO_VTK_SET_FIELD_VALUE( mObject, OutputTriangles);

	// Get the Extent value
	if (addCalled == 1)
	{
		SbVariant *vExtent = (SbVariant *)Extent.getValues(0);
		SoInput input;
		int nb_fields = Extent.getNum();

		int val0;
		int val1;
		int val2;
		int val3;
		int val4;
		int val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetExtent( 
				(int) val0,
				(int) val1,
				(int) val2,
				(int) val3,
				(int) val4,
				(int) val5
			);
		}
	}

	// Get the ThresholdCells value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ThresholdCells);

	// Get the ThresholdValue value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ThresholdValue);

	mObject->Update();
}
void SoVtkGeometryFilter::reset()
{
	mObject->UnRegister(0);
	mObject->Delete();
	mObject = 0;
	mObject = vtkGeometryFilter::New();
	mObject->Register(0);
	mObject->SetGlobalWarningDisplay(0);
	// Get the input type(s)
	SoVtkAlgorithmOutput *inputPortPtr = InputConnection.getValue();
	
	if (inputPortPtr)
		mObject->SetInputConnection(inputPortPtr->getPointer());

	// Get the CellClipping value
	
		SO_VTK_SET_FIELD_VALUE( mObject, CellClipping);

	// Get the Locator value
	
		SO_VTK_SET_FIELD_DATA( mObject, Locator, vtkPointLocator);

	// Get the PointClipping value
	
		SO_VTK_SET_FIELD_VALUE( mObject, PointClipping);

	// Get the ExtentClipping value
	
		SO_VTK_SET_FIELD_VALUE( mObject, ExtentClipping);

	// Get the Merging value
	
		SO_VTK_SET_FIELD_VALUE( mObject, Merging);

	// Get the Extent value
	if (addCalled == 1)
	{
		SbVariant *vExtent = (SbVariant *)Extent.getValues(0);
		SoInput input;
		int nb_fields = Extent.getNum();

		double val0;
		double val1;
		double val2;
		double val3;
		double val4;
		double val5;
		for (int i=0; i < nb_fields; i++)
		{
			input.setBuffer((void *)vExtent[i].getField().getString(),256);
			input.read(val0);
			input.read(val1);
			input.read(val2);
			input.read(val3);
			input.read(val4);
			input.read(val5);
			mObject->SetExtent( 
				(double) val0,
				(double) val1,
				(double) val2,
				(double) val3,
				(double) val4,
				(double) val5
			);
		}
	}

	mObject->Update();
}