CFD Online Logo CFD Online URL
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Creating VTK image compatible to Paraview Visualizer

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2016, 09:20
Question Creating VTK image compatible to Paraview Visualizer
New Member
Join Date: Jan 2016
Posts: 2
Rep Power: 0
het is on a distinguished road

I am newbie in ParaviewWeb. I have a requirement to show 3D VTK image in web browser.
Using ParaviewWeb, I am able to open the visualizer app provided in browser and sample 3D vtk image data are also working.

I have to show vtk images created programmatically by us.
My problem is proammatically created vtk images are not opening in Paraview visualizer.

I am using Kitware library to create vtk images in c#. Below is my code to generate vtk image. Please help me find where I am doing wrong?
private void create3DImage(int Zframes)
vtkRenderer render = _renderControl.RenderWindow.GetRenderers().GetFirs tRenderer();

string parent = Environment.CurrentDirectory;

vtkJPEGReader jpegReader = vtkJPEGReader.New();
jpegReader.SetFilePrefix(parent + @"\tmp\test");
jpegReader.SetDataExtent(0, 511, 0, 511, 1, Zframes);
jpegReader.SetDataSpacing(1, 1, 10);

vtkColorTransferFunction red = vtkColorTransferFunction.New();
red.AddRGBPoint(0.0, 0.0, 0.0, 0.0);
red.AddRGBPoint(255.0, 1.0, 0.0, 0.0);

vtkColorTransferFunction green = vtkColorTransferFunction.New();
green.AddRGBPoint(0.0, 0.0, 0.0, 0.0);
green.AddRGBPoint(255.0, 0.0, 1.0, 0.0);

vtkColorTransferFunction blue = vtkColorTransferFunction.New();
blue.AddRGBPoint(0.0, 0.0, 0.0, 0.0);
blue.AddRGBPoint(255.0, 0.0, 0.0, 1.0);

vtkVolumeProperty volumeProperty = vtkVolumeProperty.New();
volumeProperty.SetColor(0, red);
volumeProperty.SetColor(1, green);
volumeProperty.SetColor(2, blue);

vtkSmartVolumeMapper volumeMapper = vtkSmartVolumeMapper.New();

vtkVolume volume = vtkVolume.New();

vtkXMLImageDataWriter writer = vtkXMLImageDataWriter.New();

vtkImageData imageData = vtkImageData.New();

catch (Exception ex)
utility.ShowAndLogError(ex, "Error occured in creating 3D Image!");

I can show this vtk image in windows application using kitware vtk library code but its not opening in Web application using ParaviewWeb Visualizer.

het is offline   Reply With Quote


kitware, paraview, paraviewweb, vtk, vtkfiles

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM] Creating an average line in paraView kayoneex ParaView 14 September 21, 2020 08:46
Cht tutorial in 15 braennstroem OpenFOAM Running, Solving & CFD 197 June 10, 2015 04:02
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 18:51
Newbie: Install ParaView 3.81 on OF-1.6-ext/OpenSuse 11.2? lentschi OpenFOAM Installation 1 March 9, 2011 03:32
paraFoam reader for OpenFOAM 1.6 smart OpenFOAM Installation 13 November 16, 2009 22:41

All times are GMT -4. The time now is 06:12.