/// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVcombStreamers2(String [] argv)
    {
        //Prefix Content is: ""

          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // create pipeline[]
          //[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          ps = new vtkPlaneSource();
          ps.SetXResolution((int)4);
          ps.SetYResolution((int)4);
          ps.SetOrigin((double)2,(double)-2,(double)26);
          ps.SetPoint1((double)2,(double)2,(double)26);
          ps.SetPoint2((double)2,(double)-2,(double)32);
          psMapper = vtkPolyDataMapper.New();
          psMapper.SetInputConnection((vtkAlgorithmOutput)ps.GetOutputPort());
          psActor = new vtkActor();
          psActor.SetMapper((vtkMapper)psMapper);
          psActor.GetProperty().SetRepresentationToWireframe();
          streamer = new vtkDashedStreamLine();
          streamer.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          streamer.SetSource((vtkDataSet)ps.GetOutput());
          streamer.SetMaximumPropagationTime((double)100);
          streamer.SetIntegrationStepLength((double).2);
          streamer.SetStepLength((double).001);
          streamer.SetNumberOfThreads((int)1);
          streamer.SetIntegrationDirectionToForward();
          streamMapper = vtkPolyDataMapper.New();
          streamMapper.SetInputConnection((vtkAlgorithmOutput)streamer.GetOutputPort());
          streamMapper.SetScalarRange(
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          streamline = new vtkActor();
          streamline.SetMapper((vtkMapper)streamMapper);
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          // Add the actors to the renderer, set the background and size[]
          //[]
          ren1.AddActor((vtkProp)psActor);
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)streamline);
          ren1.SetBackground((double)1,(double)1,(double)1);
          renWin.SetSize((int)300,(int)300);
          ren1.SetBackground((double)0.1,(double)0.2,(double)0.4);
          cam1 = ren1.GetActiveCamera();
          cam1.SetClippingRange((double)3.95297,(double)50);
          cam1.SetFocalPoint((double)9.71821,(double)0.458166,(double)29.3999);
          cam1.SetPosition((double)2.7439,(double)-37.3196,(double)38.7167);
          cam1.SetViewUp((double)-0.16123,(double)0.264271,(double)0.950876);
          // render the image[]
          //[]
          renWin.Render();
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
Exemplo n.º 2
0
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVmergeFilter(String [] argv)
    {
        //Prefix Content is: ""

          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          ren2 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          renWin.AddRenderer((vtkRenderer)ren2);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // create pipeline[]
          //[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)110);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          probeLine = new vtkLineSource();
          probeLine.SetPoint1((double)1,(double)1,(double)29);
          probeLine.SetPoint2((double)16.5,(double)5,(double)31.7693);
          probeLine.SetResolution((int)500);
          probe = new vtkProbeFilter();
          probe.SetInputConnection((vtkAlgorithmOutput)probeLine.GetOutputPort());
          probe.SetSource((vtkDataObject)pl3d.GetOutput());
          probeTube = new vtkTubeFilter();
          probeTube.SetInput((vtkDataObject)probe.GetPolyDataOutput());
          probeTube.SetNumberOfSides((int)5);
          probeTube.SetRadius((double).05);
          probeMapper = vtkPolyDataMapper.New();
          probeMapper.SetInputConnection((vtkAlgorithmOutput)probeTube.GetOutputPort());
          probeMapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          probeActor = new vtkActor();
          probeActor.SetMapper((vtkMapper)probeMapper);
          displayLine = new vtkLineSource();
          displayLine.SetPoint1((double)0,(double)0,(double)0);
          displayLine.SetPoint2((double)1,(double)0,(double)0);
          displayLine.SetResolution((int)probeLine.GetResolution());
          displayMerge = new vtkMergeFilter();
          displayMerge.SetGeometry((vtkDataSet)displayLine.GetOutput());
          displayMerge.SetScalars((vtkDataSet)probe.GetPolyDataOutput());
          displayWarp = new vtkWarpScalar();
          displayWarp.SetInput((vtkDataObject)displayMerge.GetPolyDataOutput());
          displayWarp.SetNormal((double)0,(double)1,(double)0);
          displayWarp.SetScaleFactor((double).000001);
          displayMapper = vtkPolyDataMapper.New();
          displayMapper.SetInput((vtkPolyData)displayWarp.GetPolyDataOutput());
          displayMapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          displayActor = new vtkActor();
          displayActor.SetMapper((vtkMapper)displayMapper);
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          outlineActor.GetProperty().SetColor((double)0,(double)0,(double)0);
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)probeActor);
          ren1.SetBackground((double)1,(double)1,(double)1);
          ren1.SetViewport((double)0,(double).25,(double)1,(double)1);
          ren2.AddActor((vtkProp)displayActor);
          ren2.SetBackground((double)0,(double)0,(double)0);
          ren2.SetViewport((double)0,(double)0,(double)1,(double).25);
          renWin.SetSize((int)300,(int)300);
          ren1.ResetCamera();
          cam1 = ren1.GetActiveCamera();
          cam1.SetClippingRange((double)3.95297,(double)50);
          cam1.SetFocalPoint((double)8.88908,(double)0.595038,(double)29.3342);
          cam1.SetPosition((double)9.9,(double)-26,(double)41);
          cam1.SetViewUp((double)0.060772,(double)-0.319905,(double)0.945498);
          ren2.ResetCamera();
          cam2 = ren2.GetActiveCamera();
          cam2.ParallelProjectionOn();
          cam2.SetParallelScale((double).15);
          iren.Initialize();
          // render the image[]
          //[]
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
Exemplo n.º 3
0
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVpolyConn(String [] argv)
    {
        //Prefix Content is: ""

          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // read data[]
          //[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          // planes to connect[]
          plane1 = new vtkStructuredGridGeometryFilter();
          plane1.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          plane1.SetExtent((int)20,(int)20,(int)0,(int)100,(int)0,(int)100);
          conn = new vtkPolyDataConnectivityFilter();
          conn.SetInputConnection((vtkAlgorithmOutput)plane1.GetOutputPort());
          conn.ScalarConnectivityOn();
          conn.SetScalarRange((double)0.19,(double)0.25);
          plane1Map = vtkPolyDataMapper.New();
          plane1Map.SetInputConnection((vtkAlgorithmOutput)conn.GetOutputPort());
          plane1Map.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          plane1Actor = new vtkActor();
          plane1Actor.SetMapper((vtkMapper)plane1Map);
          plane1Actor.GetProperty().SetOpacity((double)0.999);
          // outline[]
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          outlineProp = outlineActor.GetProperty();
          outlineProp.SetColor((double)0,(double)0,(double)0);
          // Add the actors to the renderer, set the background and size[]
          //[]
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)plane1Actor);
          ren1.SetBackground((double)1,(double)1,(double)1);
          renWin.SetSize((int)300,(int)300);
          cam1 = new vtkCamera();
          cam1.SetClippingRange((double)14.29,(double)63.53);
          cam1.SetFocalPoint((double)8.58522,(double)1.58266,(double)30.6486);
          cam1.SetPosition((double)37.6808,(double)-20.1298,(double)35.4016);
          cam1.SetViewAngle((double)30);
          cam1.SetViewUp((double)-0.0566235,(double)0.140504,(double)0.98846);
          ren1.SetActiveCamera((vtkCamera)cam1);
          iren.Initialize();
          // render the image[]
          //[]
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
Exemplo n.º 4
0
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVmultipleIso(String [] argv)
    {
        //Prefix Content is: ""

          // get the interactor ui[]
          //# Graphics stuff[]
          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          range = pl3d.GetOutput().GetPointData().GetScalars().GetRange();
          min = (double)(lindex(range,0));
          max = (double)(lindex(range,1));
          value = (min+max)/2.0;
          cf = new vtkContourFilter();
          cf.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          cf.SetValue((int)0,(double)value);
          cf.UseScalarTreeOn();
          numberOfContours = 5;
          epsilon = (double)(max-min)/(double)(numberOfContours*10);
          min = min+epsilon;
          max = max-epsilon;
          i = 1;
          while((i) <= numberOfContours)
        {
          cf.SetValue((int)0,(double)min+((i-1)/(double)(numberOfContours-1))*(max-min));
          cf.Update();
          pd[i] = new vtkPolyData();
          pd[i].CopyStructure((vtkDataSet)cf.GetOutput());
          pd[i].GetPointData().DeepCopy((vtkFieldData)cf.GetOutput().GetPointData());
          mapper[i] = vtkPolyDataMapper.New();
          mapper[i].SetInput((vtkPolyData)pd[i]);
          mapper[i].SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetPointData().GetScalars().GetRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetPointData().GetScalars().GetRange()[1]);
          actor[i] = new vtkActor();
          actor[i].AddPosition((double)0,(double)i*12,(double)0);
          actor[i].SetMapper((vtkMapper)mapper[i]);
          ren1.AddActor((vtkProp)actor[i]);
          i = i + 1;
        }

          // Add the actors to the renderer, set the background and size[]
          //[]
          ren1.SetBackground((double).3,(double).3,(double).3);
          renWin.SetSize((int)450,(int)150);
          cam1 = ren1.GetActiveCamera();
          ren1.GetActiveCamera().SetPosition((double)-36.3762,(double)32.3855,(double)51.3652);
          ren1.GetActiveCamera().SetFocalPoint((double)8.255,(double)33.3861,(double)29.7687);
          ren1.GetActiveCamera().SetViewAngle((double)30);
          ren1.GetActiveCamera().SetViewUp((double)0,(double)0,(double)1);
          ren1.ResetCameraClippingRange();
          iren.Initialize();
          // render the image[]
          //[]
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
Exemplo n.º 5
0
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVgeomFilter(String [] argv)
    {
        //Prefix Content is: ""

          // create pipeline - structured grid[]
          //[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          gf = new vtkGeometryFilter();
          gf.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          gMapper = vtkPolyDataMapper.New();
          gMapper.SetInputConnection((vtkAlgorithmOutput)gf.GetOutputPort());
          gMapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          gActor = new vtkActor();
          gActor.SetMapper((vtkMapper)gMapper);
          gf2 = new vtkGeometryFilter();
          gf2.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          gf2.ExtentClippingOn();
          gf2.SetExtent((double)10,(double)17,(double)-6,(double)6,(double)23,(double)37);
          gf2.PointClippingOn();
          gf2.SetPointMinimum((int)0);
          gf2.SetPointMaximum((int)10000);
          gf2.CellClippingOn();
          gf2.SetCellMinimum((int)0);
          gf2.SetCellMaximum((int)7500);
          g2Mapper = vtkPolyDataMapper.New();
          g2Mapper.SetInputConnection((vtkAlgorithmOutput)gf2.GetOutputPort());
          g2Mapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          g2Actor = new vtkActor();
          g2Actor.SetMapper((vtkMapper)g2Mapper);
          g2Actor.AddPosition((double)0,(double)15,(double)0);
          // create pipeline - poly data[]
          //[]
          gf3 = new vtkGeometryFilter();
          gf3.SetInputConnection((vtkAlgorithmOutput)gf.GetOutputPort());
          g3Mapper = vtkPolyDataMapper.New();
          g3Mapper.SetInputConnection((vtkAlgorithmOutput)gf3.GetOutputPort());
          g3Mapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          g3Actor = new vtkActor();
          g3Actor.SetMapper((vtkMapper)g3Mapper);
          g3Actor.AddPosition((double)0,(double)0,(double)15);
          gf4 = new vtkGeometryFilter();
          gf4.SetInputConnection((vtkAlgorithmOutput)gf2.GetOutputPort());
          gf4.ExtentClippingOn();
          gf4.SetExtent((double)10,(double)17,(double)-6,(double)6,(double)23,(double)37);
          gf4.PointClippingOn();
          gf4.SetPointMinimum((int)0);
          gf4.SetPointMaximum((int)10000);
          gf4.CellClippingOn();
          gf4.SetCellMinimum((int)0);
          gf4.SetCellMaximum((int)7500);
          g4Mapper = vtkPolyDataMapper.New();
          g4Mapper.SetInputConnection((vtkAlgorithmOutput)gf4.GetOutputPort());
          g4Mapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          g4Actor = new vtkActor();
          g4Actor.SetMapper((vtkMapper)g4Mapper);
          g4Actor.AddPosition((double)0,(double)15,(double)15);
          // create pipeline - unstructured grid[]
          //[]
          s = new vtkSphere();
          s.SetCenter(pl3d.GetOutput().GetCenter()[0],pl3d.GetOutput().GetCenter()[1],pl3d.GetOutput().GetCenter()[2]);
          s.SetRadius((double)100.0);
          //everything[]
          eg = new vtkExtractGeometry();
          eg.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          eg.SetImplicitFunction((vtkImplicitFunction)s);
          gf5 = new vtkGeometryFilter();
          gf5.SetInputConnection((vtkAlgorithmOutput)eg.GetOutputPort());
          g5Mapper = vtkPolyDataMapper.New();
          g5Mapper.SetInputConnection((vtkAlgorithmOutput)gf5.GetOutputPort());
          g5Mapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          g5Actor = new vtkActor();
          g5Actor.SetMapper((vtkMapper)g5Mapper);
          g5Actor.AddPosition((double)0,(double)0,(double)30);
          gf6 = new vtkGeometryFilter();
          gf6.SetInputConnection((vtkAlgorithmOutput)eg.GetOutputPort());
          gf6.ExtentClippingOn();
          gf6.SetExtent((double)10,(double)17,(double)-6,(double)6,(double)23,(double)37);
          gf6.PointClippingOn();
          gf6.SetPointMinimum((int)0);
          gf6.SetPointMaximum((int)10000);
          gf6.CellClippingOn();
          gf6.SetCellMinimum((int)0);
          gf6.SetCellMaximum((int)7500);
          g6Mapper = vtkPolyDataMapper.New();
          g6Mapper.SetInputConnection((vtkAlgorithmOutput)gf6.GetOutputPort());
          g6Mapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          g6Actor = new vtkActor();
          g6Actor.SetMapper((vtkMapper)g6Mapper);
          g6Actor.AddPosition((double)0,(double)15,(double)30);
          // create pipeline - rectilinear grid[]
          //[]
          rgridReader = new vtkRectilinearGridReader();
          rgridReader.SetFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/RectGrid2.vtk");
          rgridReader.Update();
          gf7 = new vtkGeometryFilter();
          gf7.SetInputConnection((vtkAlgorithmOutput)rgridReader.GetOutputPort());
          g7Mapper = vtkPolyDataMapper.New();
          g7Mapper.SetInputConnection((vtkAlgorithmOutput)gf7.GetOutputPort());
          g7Mapper.SetScalarRange((double)((vtkDataSet)rgridReader.GetOutput()).GetScalarRange()[0],(double)((vtkDataSet)rgridReader.GetOutput()).GetScalarRange()[1]);
          g7Actor = new vtkActor();
          g7Actor.SetMapper((vtkMapper)g7Mapper);
          g7Actor.SetScale((double)3,(double)3,(double)3);
          gf8 = new vtkGeometryFilter();
          gf8.SetInputConnection((vtkAlgorithmOutput)rgridReader.GetOutputPort());
          gf8.ExtentClippingOn();
          gf8.SetExtent((double)0,(double)1,(double)-2,(double)2,(double)0,(double)4);
          gf8.PointClippingOn();
          gf8.SetPointMinimum((int)0);
          gf8.SetPointMaximum((int)10000);
          gf8.CellClippingOn();
          gf8.SetCellMinimum((int)0);
          gf8.SetCellMaximum((int)7500);
          g8Mapper = vtkPolyDataMapper.New();
          g8Mapper.SetInputConnection((vtkAlgorithmOutput)gf8.GetOutputPort());
          g8Mapper.SetScalarRange((double)((vtkDataSet)rgridReader.GetOutput()).GetScalarRange()[0],(double)((vtkDataSet)rgridReader.GetOutput()).GetScalarRange()[1]);
          g8Actor = new vtkActor();
          g8Actor.SetMapper((vtkMapper)g8Mapper);
          g8Actor.SetScale((double)3,(double)3,(double)3);
          g8Actor.AddPosition((double)0,(double)15,(double)0);
          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          ren1.AddActor((vtkProp)gActor);
          ren1.AddActor((vtkProp)g2Actor);
          ren1.AddActor((vtkProp)g3Actor);
          ren1.AddActor((vtkProp)g4Actor);
          ren1.AddActor((vtkProp)g5Actor);
          ren1.AddActor((vtkProp)g6Actor);
          ren1.AddActor((vtkProp)g7Actor);
          ren1.AddActor((vtkProp)g8Actor);
          renWin.SetSize((int)340,(int)550);
          cam1 = ren1.GetActiveCamera();
          cam1.SetClippingRange((double)84,(double)174);
          cam1.SetFocalPoint((double)5.22824,(double)6.09412,(double)35.9813);
          cam1.SetPosition((double)100.052,(double)62.875,(double)102.818);
          cam1.SetViewUp((double)-0.307455,(double)-0.464269,(double)0.830617);
          iren.Initialize();
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
    /// <summary>
    /// Entry Point
    /// </summary>
    /// <param name="argv"></param>
    public static void Main(String[] argv)
    {
        // This example demonstrates how to use the vtkLineWidget to seed
        // and manipulate streamlines. Two line widgets are created. One is
        // invoked by pressing 'W', the other by pressing 'L'. Both can exist
        // together.
        // Start by loading some data.
        pl3d = vtkPLOT3DReader.New();
        pl3d.SetXYZFileName("../../../combxyz.bin");
        pl3d.SetQFileName("../../../combq.bin");
        pl3d.SetScalarFunctionNumber(100);
        pl3d.SetVectorFunctionNumber(202);
        pl3d.Update();
        // The line widget is used seed the streamlines.
        lineWidget = vtkLineWidget.New();
        seeds = vtkPolyData.New();

        lineWidget.SetInput(pl3d.GetOutput());
        lineWidget.SetAlignToYAxis();
        lineWidget.PlaceWidget();
        lineWidget.GetPolyData(seeds);
        lineWidget.ClampToBoundsOn();

        rk4 = vtkRungeKutta4.New();
        streamer = vtkStreamLine.New();
        streamer.SetInputConnection(pl3d.GetOutputPort());
        streamer.SetSource(seeds);
        streamer.SetMaximumPropagationTime(100);
        streamer.SetIntegrationStepLength(.2);
        streamer.SetStepLength(.001);
        streamer.SetNumberOfThreads(1);
        streamer.SetIntegrationDirectionToForward();
        streamer.VorticityOn();
        streamer.SetIntegrator(rk4);

        rf = vtkRibbonFilter.New();
        rf.SetInputConnection(streamer.GetOutputPort());
        rf.SetWidth(0.1);
        rf.SetWidthFactor(5);

        streamMapper = vtkPolyDataMapper.New();
        streamMapper.SetInputConnection(rf.GetOutputPort());
        streamMapper.SetScalarRange(pl3d.GetOutput().GetScalarRange()[0], pl3d.GetOutput().GetScalarRange()[1]);
        streamline = vtkActor.New();
        streamline.SetMapper(streamMapper);
        streamline.VisibilityOff();

        // The second line widget is used seed more streamlines.
        lineWidget2 = vtkLineWidget.New();
        seeds2 = vtkPolyData.New();
        lineWidget2.SetInput(pl3d.GetOutput());
        lineWidget2.PlaceWidget();
        lineWidget2.GetPolyData(seeds2);
        lineWidget2.SetKeyPressActivationValue((sbyte)108);

        streamer2 = vtkStreamLine.New();
        streamer2.SetInputConnection(pl3d.GetOutputPort());
        streamer2.SetSource(seeds2);
        streamer2.SetMaximumPropagationTime(100);
        streamer2.SetIntegrationStepLength(.2);
        streamer2.SetStepLength(.001);
        streamer2.SetNumberOfThreads(1);
        streamer2.SetIntegrationDirectionToForward();
        streamer2.VorticityOn();
        streamer2.SetIntegrator(rk4);

        rf2 = vtkRibbonFilter.New();
        rf2.SetInputConnection(streamer2.GetOutputPort());
        rf2.SetWidth(0.1);
        rf2.SetWidthFactor(5);

        streamMapper2 = vtkPolyDataMapper.New();
        streamMapper2.SetInputConnection(rf2.GetOutputPort());
        streamMapper2.SetScalarRange(pl3d.GetOutput().GetScalarRange()[0], pl3d.GetOutput().GetScalarRange()[1]);

        streamline2 = vtkActor.New();
        streamline2.SetMapper(streamMapper2);
        streamline2.VisibilityOff();

        outline = vtkStructuredGridOutlineFilter.New();
        outline.SetInputConnection(pl3d.GetOutputPort());

        outlineMapper = vtkPolyDataMapper.New();
        outlineMapper.SetInputConnection(outline.GetOutputPort());
        outlineActor = vtkActor.New();
        outlineActor.SetMapper(outlineMapper);

        // Create the RenderWindow, Renderer and both Actors
        ren1 = vtkRenderer.New();
        renWin = vtkRenderWindow.New();
        renWin.AddRenderer(ren1);
        iren = vtkRenderWindowInteractor.New();
        iren.SetRenderWindow(renWin);

        // Associate the line widget with the interactor
        lineWidget.SetInteractor(iren);
        lineWidget.StartInteractionEvt += new vtkObject.vtkObjectEventHandler(BeginInteraction);
        lineWidget.InteractionEvt += new vtkObject.vtkObjectEventHandler(GenerateStreamlines);
        lineWidget2.SetInteractor(iren);
        lineWidget2.StartInteractionEvt += new vtkObject.vtkObjectEventHandler(BeginInteraction2);
        lineWidget2.EndInteractionEvt += new vtkObject.vtkObjectEventHandler(GenerateStreamlines2);

        // Add the actors to the renderer, set the background and size
        ren1.AddActor(outlineActor);
        ren1.AddActor(streamline);
        ren1.AddActor(streamline2);

        ren1.SetBackground(1, 1, 1);
        renWin.SetSize(300, 300);
        ren1.SetBackground(0.1, 0.2, 0.4);

        cam1 = ren1.GetActiveCamera();
        cam1.SetClippingRange(3.95297, 50);
        cam1.SetFocalPoint(9.71821, 0.458166, 29.3999);
        cam1.SetPosition(2.7439, -37.3196, 38.7167);
        cam1.SetViewUp(-0.16123, 0.264271, 0.950876);

        // render the image
        renWin.Render();
        lineWidget2.On();
        iren.Initialize();
        iren.Start();

        //Clean Up
        deleteAllVTKObjects();
    }
Exemplo n.º 7
0
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVprobeComb(String [] argv)
    {
        //Prefix Content is: ""

          // create planes[]
          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // create pipeline[]
          //[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          plane = new vtkPlaneSource();
          plane.SetResolution((int)50,(int)50);
          transP1 = new vtkTransform();
          transP1.Translate((double)3.7,(double)0.0,(double)28.37);
          transP1.Scale((double)5,(double)5,(double)5);
          transP1.RotateY((double)90);
          tpd1 = new vtkTransformPolyDataFilter();
          tpd1.SetInputConnection((vtkAlgorithmOutput)plane.GetOutputPort());
          tpd1.SetTransform((vtkAbstractTransform)transP1);
          outTpd1 = new vtkOutlineFilter();
          outTpd1.SetInputConnection((vtkAlgorithmOutput)tpd1.GetOutputPort());
          mapTpd1 = vtkPolyDataMapper.New();
          mapTpd1.SetInputConnection((vtkAlgorithmOutput)outTpd1.GetOutputPort());
          tpd1Actor = new vtkActor();
          tpd1Actor.SetMapper((vtkMapper)mapTpd1);
          tpd1Actor.GetProperty().SetColor((double)0,(double)0,(double)0);
          transP2 = new vtkTransform();
          transP2.Translate((double)9.2,(double)0.0,(double)31.20);
          transP2.Scale((double)5,(double)5,(double)5);
          transP2.RotateY((double)90);
          tpd2 = new vtkTransformPolyDataFilter();
          tpd2.SetInputConnection((vtkAlgorithmOutput)plane.GetOutputPort());
          tpd2.SetTransform((vtkAbstractTransform)transP2);
          outTpd2 = new vtkOutlineFilter();
          outTpd2.SetInputConnection((vtkAlgorithmOutput)tpd2.GetOutputPort());
          mapTpd2 = vtkPolyDataMapper.New();
          mapTpd2.SetInputConnection((vtkAlgorithmOutput)outTpd2.GetOutputPort());
          tpd2Actor = new vtkActor();
          tpd2Actor.SetMapper((vtkMapper)mapTpd2);
          tpd2Actor.GetProperty().SetColor((double)0,(double)0,(double)0);
          transP3 = new vtkTransform();
          transP3.Translate((double)13.27,(double)0.0,(double)33.30);
          transP3.Scale((double)5,(double)5,(double)5);
          transP3.RotateY((double)90);
          tpd3 = new vtkTransformPolyDataFilter();
          tpd3.SetInputConnection((vtkAlgorithmOutput)plane.GetOutputPort());
          tpd3.SetTransform((vtkAbstractTransform)transP3);
          outTpd3 = new vtkOutlineFilter();
          outTpd3.SetInputConnection((vtkAlgorithmOutput)tpd3.GetOutputPort());
          mapTpd3 = vtkPolyDataMapper.New();
          mapTpd3.SetInputConnection((vtkAlgorithmOutput)outTpd3.GetOutputPort());
          tpd3Actor = new vtkActor();
          tpd3Actor.SetMapper((vtkMapper)mapTpd3);
          tpd3Actor.GetProperty().SetColor((double)0,(double)0,(double)0);
          appendF = new vtkAppendPolyData();
          appendF.AddInput((vtkPolyData)tpd1.GetOutput());
          appendF.AddInput((vtkPolyData)tpd2.GetOutput());
          appendF.AddInput((vtkPolyData)tpd3.GetOutput());
          probe = new vtkProbeFilter();
          probe.SetInputConnection((vtkAlgorithmOutput)appendF.GetOutputPort());
          probe.SetSource((vtkDataObject)pl3d.GetOutput());
          contour = new vtkContourFilter();
          contour.SetInputConnection((vtkAlgorithmOutput)probe.GetOutputPort());
          contour.GenerateValues((int)50,(double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          contourMapper = vtkPolyDataMapper.New();
          contourMapper.SetInputConnection((vtkAlgorithmOutput)contour.GetOutputPort());
          contourMapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          planeActor = new vtkActor();
          planeActor.SetMapper((vtkMapper)contourMapper);
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          outlineActor.GetProperty().SetColor((double)0,(double)0,(double)0);
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)planeActor);
          ren1.AddActor((vtkProp)tpd1Actor);
          ren1.AddActor((vtkProp)tpd2Actor);
          ren1.AddActor((vtkProp)tpd3Actor);
          ren1.SetBackground((double)1,(double)1,(double)1);
          renWin.SetSize((int)400,(int)400);
          cam1 = ren1.GetActiveCamera();
          cam1.SetClippingRange((double)3.95297,(double)50);
          cam1.SetFocalPoint((double)8.88908,(double)0.595038,(double)29.3342);
          cam1.SetPosition((double)-12.3332,(double)31.7479,(double)41.2387);
          cam1.SetViewUp((double)0.060772,(double)-0.319905,(double)0.945498);
          iren.Initialize();
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVTestGridSynchronizedTemplates3D(String [] argv)
    {
        //Prefix Content is: ""

          // cut data[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          range = pl3d.GetOutput().GetPointData().GetScalars().GetRange();
          min = (double)(lindex(range,0));
          max = (double)(lindex(range,1));
          value = (min+max)/2.0;
          //vtkGridSynchronizedTemplates3D cf[]
          cf = new vtkContourFilter();
          cf.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          cf.SetValue((int)0,(double)value);
          //cf ComputeNormalsOff[]
          cfMapper = vtkPolyDataMapper.New();
          cfMapper.ImmediateModeRenderingOn();
          cfMapper.SetInputConnection((vtkAlgorithmOutput)cf.GetOutputPort());
          cfMapper.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetPointData().GetScalars().GetRange()[0], (double)((vtkDataSet)pl3d.GetOutput()).GetPointData().GetScalars().GetRange()[1]);
          cfActor = new vtkActor();
          cfActor.SetMapper((vtkMapper)cfMapper);
          //outline[]
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          outlineActor.GetProperty().SetColor((double)0,(double)0,(double)0);
          //# Graphics stuff[]
          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // Add the actors to the renderer, set the background and size[]
          //[]
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)cfActor);
          ren1.SetBackground((double)1,(double)1,(double)1);
          renWin.SetSize((int)400,(int)400);
          cam1 = ren1.GetActiveCamera();
          cam1.SetClippingRange((double)3.95297,(double)50);
          cam1.SetFocalPoint((double)9.71821,(double)0.458166,(double)29.3999);
          cam1.SetPosition((double)2.7439,(double)-37.3196,(double)38.7167);
          cam1.SetViewUp((double)-0.16123,(double)0.264271,(double)0.950876);
          iren.Initialize();
          // render the image[]
          //[]
          // loop over surfaces[]
          i = 0;
          while((i) < 17)
        {
          cf.SetValue((int)0,(double)min+(i/16.0)*(max-min));
          renWin.Render();
          i = i + 1;
        }

          cf.SetValue((int)0,(double)min+(0.2)*(max-min));
          renWin.Render();
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
Exemplo n.º 9
0
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVprobe(String [] argv)
    {
        //Prefix Content is: ""

          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // cut data[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/combq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          plane = new vtkPlane();
          plane.SetOrigin(pl3d.GetOutput().GetCenter()[0],pl3d.GetOutput().GetCenter()[1],pl3d.GetOutput().GetCenter()[2]);
          plane.SetNormal((double)-0.287,(double)0,(double)0.9579);
          planeCut = new vtkCutter();
          planeCut.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          planeCut.SetCutFunction((vtkImplicitFunction)plane);
          probe = new vtkProbeFilter();
          probe.SetInputConnection((vtkAlgorithmOutput)planeCut.GetOutputPort());
          probe.SetSourceConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          cutMapper = new vtkDataSetMapper();
          cutMapper.SetInputConnection((vtkAlgorithmOutput)probe.GetOutputPort());
          cutMapper.SetScalarRange((double)((vtkStructuredGrid)pl3d.GetOutput()).GetPointData().GetScalars().GetRange()[0],
          (double)((vtkStructuredGrid)pl3d.GetOutput()).GetPointData().GetScalars().GetRange()[1]);
          cutActor = new vtkActor();
          cutActor.SetMapper((vtkMapper)cutMapper);
          //extract plane[]
          compPlane = new vtkStructuredGridGeometryFilter();
          compPlane.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          compPlane.SetExtent((int)0,(int)100,(int)0,(int)100,(int)9,(int)9);
          planeMapper = vtkPolyDataMapper.New();
          planeMapper.SetInputConnection((vtkAlgorithmOutput)compPlane.GetOutputPort());
          planeMapper.ScalarVisibilityOff();
          planeActor = new vtkActor();
          planeActor.SetMapper((vtkMapper)planeMapper);
          planeActor.GetProperty().SetRepresentationToWireframe();
          planeActor.GetProperty().SetColor((double)0,(double)0,(double)0);
          //outline[]
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          outlineProp = outlineActor.GetProperty();
          outlineProp.SetColor((double)0,(double)0,(double)0);
          // Add the actors to the renderer, set the background and size[]
          //[]
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)planeActor);
          ren1.AddActor((vtkProp)cutActor);
          ren1.SetBackground((double)1,(double)1,(double)1);
          renWin.SetSize((int)400,(int)300);
          cam1 = ren1.GetActiveCamera();
          cam1.SetClippingRange((double)11.1034,(double)59.5328);
          cam1.SetFocalPoint((double)9.71821,(double)0.458166,(double)29.3999);
          cam1.SetPosition((double)-2.95748,(double)-26.7271,(double)44.5309);
          cam1.SetViewUp((double)0.0184785,(double)0.479657,(double)0.877262);
          iren.Initialize();
          // render the image[]
          //[]
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }
    /// <summary>
    /// The main entry method called by the CSharp driver
    /// </summary>
    /// <param name="argv"></param>
    public static void AVtextureThreshold(String [] argv)
    {
        //Prefix Content is: ""

          // Create the RenderWindow, Renderer and both Actors[]
          //[]
          ren1 = vtkRenderer.New();
          renWin = vtkRenderWindow.New();
          renWin.AddRenderer((vtkRenderer)ren1);
          iren = new vtkRenderWindowInteractor();
          iren.SetRenderWindow((vtkRenderWindow)renWin);
          // read data[]
          //[]
          pl3d = new vtkPLOT3DReader();
          pl3d.SetXYZFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/bluntfinxyz.bin");
          pl3d.SetQFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/bluntfinq.bin");
          pl3d.SetScalarFunctionNumber((int)100);
          pl3d.SetVectorFunctionNumber((int)202);
          pl3d.Update();
          // wall[]
          //[]
          wall = new vtkStructuredGridGeometryFilter();
          wall.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          wall.SetExtent((int)0,(int)100,(int)0,(int)0,(int)0,(int)100);
          wallMap = vtkPolyDataMapper.New();
          wallMap.SetInputConnection((vtkAlgorithmOutput)wall.GetOutputPort());
          wallMap.ScalarVisibilityOff();
          wallActor = new vtkActor();
          wallActor.SetMapper((vtkMapper)wallMap);
          wallActor.GetProperty().SetColor((double)0.8,(double)0.8,(double)0.8);
          // fin[]
          // []
          fin = new vtkStructuredGridGeometryFilter();
          fin.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          fin.SetExtent((int)0,(int)100,(int)0,(int)100,(int)0,(int)0);
          finMap = vtkPolyDataMapper.New();
          finMap.SetInputConnection((vtkAlgorithmOutput)fin.GetOutputPort());
          finMap.ScalarVisibilityOff();
          finActor = new vtkActor();
          finActor.SetMapper((vtkMapper)finMap);
          finActor.GetProperty().SetColor((double)0.8,(double)0.8,(double)0.8);
          // planes to threshold[]
          tmap = new vtkStructuredPointsReader();
          tmap.SetFileName((string)"" + (VTK_DATA_ROOT.ToString()) + "/Data/texThres2.vtk");
          texture = new vtkTexture();
          texture.SetInputConnection((vtkAlgorithmOutput)tmap.GetOutputPort());
          texture.InterpolateOff();
          texture.RepeatOff();
          plane1 = new vtkStructuredGridGeometryFilter();
          plane1.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          plane1.SetExtent((int)10,(int)10,(int)0,(int)100,(int)0,(int)100);
          thresh1 = new vtkThresholdTextureCoords();
          thresh1.SetInputConnection((vtkAlgorithmOutput)plane1.GetOutputPort());
          thresh1.ThresholdByUpper((double)1.5);
          plane1Map = new vtkDataSetMapper();
          plane1Map.SetInputConnection((vtkAlgorithmOutput)thresh1.GetOutputPort());
          plane1Map.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          plane1Actor = new vtkActor();
          plane1Actor.SetMapper((vtkMapper)plane1Map);
          plane1Actor.SetTexture((vtkTexture)texture);
          plane1Actor.GetProperty().SetOpacity((double)0.999);
          plane2 = new vtkStructuredGridGeometryFilter();
          plane2.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          plane2.SetExtent((int)30,(int)30,(int)0,(int)100,(int)0,(int)100);
          thresh2 = new vtkThresholdTextureCoords();
          thresh2.SetInputConnection((vtkAlgorithmOutput)plane2.GetOutputPort());
          thresh2.ThresholdByLower((double)1.5);
          plane2Map = new vtkDataSetMapper();
          plane2Map.SetInputConnection((vtkAlgorithmOutput)thresh2.GetOutputPort());
          plane2Map.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          plane2Actor = new vtkActor();
          plane2Actor.SetMapper((vtkMapper)plane2Map);
          plane2Actor.SetTexture((vtkTexture)texture);
          plane2Actor.GetProperty().SetOpacity((double)0.999);
          plane3 = new vtkStructuredGridGeometryFilter();
          plane3.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          plane3.SetExtent((int)35,(int)35,(int)0,(int)100,(int)0,(int)100);
          thresh3 = new vtkThresholdTextureCoords();
          thresh3.SetInputConnection((vtkAlgorithmOutput)plane3.GetOutputPort());
          thresh3.ThresholdBetween((double)1.5,(double)1.8);
          plane3Map = new vtkDataSetMapper();
          plane3Map.SetInputConnection((vtkAlgorithmOutput)thresh3.GetOutputPort());
          plane3Map.SetScalarRange((double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[0],
          (double)((vtkDataSet)pl3d.GetOutput()).GetScalarRange()[1]);
          plane3Actor = new vtkActor();
          plane3Actor.SetMapper((vtkMapper)plane3Map);
          plane3Actor.SetTexture((vtkTexture)texture);
          plane3Actor.GetProperty().SetOpacity((double)0.999);
          // outline[]
          outline = new vtkStructuredGridOutlineFilter();
          outline.SetInputConnection((vtkAlgorithmOutput)pl3d.GetOutputPort());
          outlineMapper = vtkPolyDataMapper.New();
          outlineMapper.SetInputConnection((vtkAlgorithmOutput)outline.GetOutputPort());
          outlineActor = new vtkActor();
          outlineActor.SetMapper((vtkMapper)outlineMapper);
          outlineProp = outlineActor.GetProperty();
          outlineProp.SetColor((double)0,(double)0,(double)0);
          // Add the actors to the renderer, set the background and size[]
          //[]
          ren1.AddActor((vtkProp)outlineActor);
          ren1.AddActor((vtkProp)wallActor);
          ren1.AddActor((vtkProp)finActor);
          ren1.AddActor((vtkProp)plane1Actor);
          ren1.AddActor((vtkProp)plane2Actor);
          ren1.AddActor((vtkProp)plane3Actor);
          ren1.SetBackground((double)1,(double)1,(double)1);
          renWin.SetSize((int)256,(int)256);
          cam1 = new vtkCamera();
          cam1.SetClippingRange((double)1.51176,(double)75.5879);
          cam1.SetFocalPoint((double)2.33749,(double)2.96739,(double)3.61023);
          cam1.SetPosition((double)10.8787,(double)5.27346,(double)15.8687);
          cam1.SetViewAngle((double)30);
          cam1.SetViewUp((double)-0.0610856,(double)0.987798,(double)-0.143262);
          ren1.SetActiveCamera((vtkCamera)cam1);
          iren.Initialize();
          // render the image[]
          //[]
          // prevent the tk window from showing up then start the event loop[]

        //deleteAllVTKObjects();
    }