Re: [Paraview] Use point arrays as coordinates
That's what I was looking for. Thanks a lot! Ian Am 11.02.2014 15:41, schrieb Bruce Jones: Have you tried using the calculator filter? you would need to Toggle Advanced in the filter properties (the little cog button), check coordinate results, then enter the array name in the expression field. Bruce On Tue, Feb 11, 2014 at 4:15 AM, Ian Krukow i.kru...@tu-braunschweig.de mailto:i.kru...@tu-braunschweig.de wrote: Hi all, I am doing CFD simulations of pitching oscillations of a 2D profile. The mesh should be rigid and move through the space. This way, the mesh coordinates (as body-fixed coordinates) stay constant over time, but the position in an intertial space changes. These geodesic coordinates are written to the result files as point arrays. To check the movement of the profile, I would like to have the geodesic coordinates (given as property array) instead of the mesh coordinates for rendering. How can I replace the geometry coordinates by a given point array? Kind regards Ian _ Powered by www.kitware.com http://www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/__opensource/opensource.html http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/__ParaView http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/__mailman/listinfo/paraview http://www.paraview.org/mailman/listinfo/paraview ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Problem with Custom ParaView Reader
Hi Kalin, I'm thinking that maybe there is ghost level information that is wrong, or maybe extent information. I'm assuming that you're running the server in serial so in that case you shouldn't have any ghost levels. If your grid has 16 points in each direction than than the extent for that should be [i, i+15, j, j+15, k, k+15] for a single process (note that extents don't need to start from 0 but usually do). If your grid is 16 cells in each direction than the extent would be [i, i+16, j, j+16, k, k+16]. If that isn't the problem, dan you share your code and your vti file from your test harness? Regards, Andy On Wed, Feb 12, 2014 at 1:11 PM, Kalin Kanov ka...@cs.jhu.edu wrote: Dear All, I am developing a custom ParaView reader for my data. I have a working plugin for ParaView that reads and displays the data. However, what I am getting in the 3D view is not as expected. My reader subclasses vtkImageAlgorithm and produces a 3D structured grid. When I load the data in ParaView I only see 3 of the surfaces of the cube (attached is a screenshot). Any idea why this would be happening? When I view the data in spreadsheet form all 4096 point (the testing cube is 16x16x16) have associated scalar data and the coordinates look good, but the 3D view displays only the left, right and bottom walls of the cube. Additionally, I also have a small test harness that uses my custom reader as input for a vtkXMLImageDataWriter and the resulting .vti file when loaded into ParaView and visualized looks good. Thank you, Kalin Kanov ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Problem with Custom ParaView Reader
Hi Andy, Thanks for the quick response. I am setting the extent to be [0,16,0,16,0,16], as follows: in the constructor: this-extent[0] = 0; this-extent[1] = 16; this-extent[2] = 0; this-extent[3] = 16; this-extent[4] = 0; this-extent[5] = 16; in RequestInformation(): outInfo-Set( vtkStreamingDemandDrivenPipeline:: WHOLE_EXTENT(), this-extent, 6); Attached is the .vti file and the code. In the test harness I also have a vtkRenderer, which also displays the data as a 3d cube. On 12.2.2014 г. 13:30, Andy Bauer wrote: Hi Kalin, I'm thinking that maybe there is ghost level information that is wrong, or maybe extent information. I'm assuming that you're running the server in serial so in that case you shouldn't have any ghost levels. If your grid has 16 points in each direction than than the extent for that should be [i, i+15, j, j+15, k, k+15] for a single process (note that extents don't need to start from 0 but usually do). If your grid is 16 cells in each direction than the extent would be [i, i+16, j, j+16, k, k+16]. If that isn't the problem, dan you share your code and your vti file from your test harness? Regards, Andy On Wed, Feb 12, 2014 at 1:11 PM, Kalin Kanov ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu wrote: Dear All, I am developing a custom ParaView reader for my data. I have a working plugin for ParaView that reads and displays the data. However, what I am getting in the 3D view is not as expected. My reader subclasses vtkImageAlgorithm and produces a 3D structured grid. When I load the data in ParaView I only see 3 of the surfaces of the cube (attached is a screenshot). Any idea why this would be happening? When I view the data in spreadsheet form all 4096 point (the testing cube is 16x16x16) have associated scalar data and the coordinates look good, but the 3D view displays only the left, right and bottom walls of the cube. Additionally, I also have a small test harness that uses my custom reader as input for a vtkXMLImageDataWriter and the resulting .vti file when loaded into ParaView and visualized looks good. Thank you, Kalin Kanov #include vtkJHTDBReader.h #include vtkActor2D.h #include vtkImageData.h #include vtkImageMapper.h #include vtkInteractorStyleImage.h #include vtkSmartPointer.h #include vtkPolyDataMapper.h #include vtkActor.h #include vtkSimplePointsReader.h #include vtkRenderWindow.h #include vtkRenderWindowInteractor.h #include vtkRenderer.h #include vtkProperty.h #include vtkXMLImageDataWriter.h #include vtkXMLImageDataReader.h #include vtkImageDataGeometryFilter.h #using System.dll #using System.Data.dll using namespace System; using namespace System::Collections::Generic; using namespace System::Text; using namespace System::Data; using namespace System::Data::SqlClient; using namespace System::Collections; void PrintImage(vtkImageData* image); int main(int argc, char* argv[]) { // Verify input arguments if ( argc != 2 ) { std::cout Usage: argv[0] Filename(.xyz) std::endl; return EXIT_FAILURE; } // Read the file vtkSmartPointervtkJHTDBReader reader = vtkSmartPointervtkJHTDBReader::New(); reader-SetFileName ( argv[1] ); reader-Update(); //TODO: Figure out how to set the extent. vtkImageData* output = reader-GetOutput(); PrintImage(output); vtkSmartPointervtkXMLImageDataWriter writer = vtkSmartPointervtkXMLImageDataWriter::New(); writer-SetFileName(C:\\Documents and Settings\\Kalin Kanov\\My Documents\\Research\\JHTDBReader\\test.vti); writer-SetInputData(output); //writer-SetInputConnection(reader-GetOutputPort()); writer-Write(); Read the file (to test that it was written correctly) //vtkSmartPointervtkXMLImageDataReader image_reader = //vtkSmartPointervtkXMLImageDataReader::New(); //image_reader-SetFileName(C:\\Users\\kalin\\Documents\\JHTDBReader\\build\\Debug\\test.vti); //image_reader-Update(); // Convert the image to a polydata vtkSmartPointervtkImageDataGeometryFilter imageDataGeometryFilter = vtkSmartPointervtkImageDataGeometryFilter::New(); imageDataGeometryFilter-SetInputConnection(reader-GetOutputPort()); imageDataGeometryFilter-Update(); vtkSmartPointervtkPolyDataMapper mapper = vtkSmartPointervtkPolyDataMapper::New(); mapper-SetInputConnection(imageDataGeometryFilter-GetOutputPort()); vtkSmartPointervtkActor actor = vtkSmartPointervtkActor::New(); actor-SetMapper(mapper); actor-GetProperty()-SetPointSize(3); // Setup rendering vtkSmartPointervtkRenderer renderer =
Re: [Paraview] Problem with Custom ParaView Reader
Hi Kalin, I think the issue is that your extents are wrong. The extents should be the index of the first and last point in each logical direction so it should be [0, 15, 0, 15, 0, 15] if you have a square grid with 4096 points. Note that this is the whole extent that the reader could provide even though subsequent filters may ask for a reduced extent. Also, in RequestData() you should get the requested extent with something like the following and take out the SetDimension() call: vtkInformation *outInfo = outputVector-GetInformationObject(outputPort); int subext[6]; outInfo-Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),subext); image-SetExtent(subext); Then use the subextent to fill in your scalars array since it may be less than what it could potentially provide (e.g. why read in all data when you only need a subset of that). I've filled in the vtkJHTDBReader.cxx code with some comments and changes. You should go through and review what I did since I can't test your code. Regards, Andy On Wed, Feb 12, 2014 at 1:47 PM, Kalin Kanov ka...@cs.jhu.edu wrote: Hi Andy, Thanks for the quick response. I am setting the extent to be [0,16,0,16,0,16], as follows: in the constructor: this-extent[0] = 0; this-extent[1] = 16; this-extent[2] = 0; this-extent[3] = 16; this-extent[4] = 0; this-extent[5] = 16; in RequestInformation(): outInfo-Set( vtkStreamingDemandDrivenPipeline:: WHOLE_EXTENT(), this-extent, 6); Attached is the .vti file and the code. In the test harness I also have a vtkRenderer, which also displays the data as a 3d cube. On 12.2.2014 г. 13:30, Andy Bauer wrote: Hi Kalin, I'm thinking that maybe there is ghost level information that is wrong, or maybe extent information. I'm assuming that you're running the server in serial so in that case you shouldn't have any ghost levels. If your grid has 16 points in each direction than than the extent for that should be [i, i+15, j, j+15, k, k+15] for a single process (note that extents don't need to start from 0 but usually do). If your grid is 16 cells in each direction than the extent would be [i, i+16, j, j+16, k, k+16]. If that isn't the problem, dan you share your code and your vti file from your test harness? Regards, Andy On Wed, Feb 12, 2014 at 1:11 PM, Kalin Kanov ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu wrote: Dear All, I am developing a custom ParaView reader for my data. I have a working plugin for ParaView that reads and displays the data. However, what I am getting in the 3D view is not as expected. My reader subclasses vtkImageAlgorithm and produces a 3D structured grid. When I load the data in ParaView I only see 3 of the surfaces of the cube (attached is a screenshot). Any idea why this would be happening? When I view the data in spreadsheet form all 4096 point (the testing cube is 16x16x16) have associated scalar data and the coordinates look good, but the 3D view displays only the left, right and bottom walls of the cube. Additionally, I also have a small test harness that uses my custom reader as input for a vtkXMLImageDataWriter and the resulting .vti file when loaded into ParaView and visualized looks good. Thank you, Kalin Kanov #include vtkJHTDBReader.h #include string.h #include vtkDataObject.h #include vtkFloatArray.h #include vtkImageData.h #include vtkInformation.h #include vtkInformationVector.h #include vtkPointData.h #include vtkSmartPointer.h #include vtkStreamingDemandDrivenPipeline.h #using System.dll #using System.Data.dll using namespace System; using namespace System::Collections::Generic; using namespace System::Text; using namespace System::Data; using namespace System::Data::SqlClient; using namespace System::Collections; vtkJHTDBReader* vtkJHTDBReader::New() { return new vtkJHTDBReader(); } vtkJHTDBReader::vtkJHTDBReader() { this-dataPointSize = sizeof(float); this-atomSize = 4; this-SqlArrayHeaderSize = 24; this-components = 3; this-FileName = NULL; this-SetNumberOfInputPorts(0); // these really correspond to the whole extent in VTK meaning the entire set of points that // this reader can provide, regardless of whether or not it actually provides each one of // these points. this-extent[0] = 0; this-extent[1] = 16; this-extent[2] = 0; this-extent[3] = 16; this-extent[4] = 0; this-extent[5] = 16; } vtkJHTDBReader::~vtkJHTDBReader() { delete [] this-FileName; } void vtkJHTDBReader::SetFileName(const char* fname) { size_t size = strlen(fname) + 1; this-FileName = new char[size]; strcpy_s(this-FileName, size, fname); } const char* vtkJHTDBReader::GetFileName() { return this-FileName; } void vtkJHTDBReader::PrintSelf(ostream os, vtkIndent indent) { this-Superclass::PrintSelf(os,indent); os indent File
Re: [Paraview] Problem with Custom ParaView Reader
Hi Andy, Thank you for taking a close look at this and for the comments. That seems to have been indeed the issue. Best, Kalin On 12.2.2014 г. 14:40, Andy Bauer wrote: Hi Kalin, I think the issue is that your extents are wrong. The extents should be the index of the first and last point in each logical direction so it should be [0, 15, 0, 15, 0, 15] if you have a square grid with 4096 points. Note that this is the whole extent that the reader could provide even though subsequent filters may ask for a reduced extent. Also, in RequestData() you should get the requested extent with something like the following and take out the SetDimension() call: vtkInformation *outInfo = outputVector-GetInformationObject(outputPort); int subext[6]; outInfo-Get(vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),subext); image-SetExtent(subext); Then use the subextent to fill in your scalars array since it may be less than what it could potentially provide (e.g. why read in all data when you only need a subset of that). I've filled in the vtkJHTDBReader.cxx code with some comments and changes. You should go through and review what I did since I can't test your code. Regards, Andy On Wed, Feb 12, 2014 at 1:47 PM, Kalin Kanov ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu wrote: Hi Andy, Thanks for the quick response. I am setting the extent to be [0,16,0,16,0,16], as follows: in the constructor: this-extent[0] = 0; this-extent[1] = 16; this-extent[2] = 0; this-extent[3] = 16; this-extent[4] = 0; this-extent[5] = 16; in RequestInformation(): outInfo-Set( vtkStreamingDemandDrivenPipeli__ne:: WHOLE_EXTENT(), this-extent, 6); Attached is the .vti file and the code. In the test harness I also have a vtkRenderer, which also displays the data as a 3d cube. On 12.2.2014 г. 13:30, Andy Bauer wrote: Hi Kalin, I'm thinking that maybe there is ghost level information that is wrong, or maybe extent information. I'm assuming that you're running the server in serial so in that case you shouldn't have any ghost levels. If your grid has 16 points in each direction than than the extent for that should be [i, i+15, j, j+15, k, k+15] for a single process (note that extents don't need to start from 0 but usually do). If your grid is 16 cells in each direction than the extent would be [i, i+16, j, j+16, k, k+16]. If that isn't the problem, dan you share your code and your vti file from your test harness? Regards, Andy On Wed, Feb 12, 2014 at 1:11 PM, Kalin Kanov ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu wrote: Dear All, I am developing a custom ParaView reader for my data. I have a working plugin for ParaView that reads and displays the data. However, what I am getting in the 3D view is not as expected. My reader subclasses vtkImageAlgorithm and produces a 3D structured grid. When I load the data in ParaView I only see 3 of the surfaces of the cube (attached is a screenshot). Any idea why this would be happening? When I view the data in spreadsheet form all 4096 point (the testing cube is 16x16x16) have associated scalar data and the coordinates look good, but the 3D view displays only the left, right and bottom walls of the cube. Additionally, I also have a small test harness that uses my custom reader as input for a vtkXMLImageDataWriter and the resulting .vti file when loaded into ParaView and visualized looks good. Thank you, Kalin Kanov ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
Re: [Paraview] Problem with Custom ParaView Reader
Glad to hear it. The nice thing with the extents is that if you're doing it correctly then the writer should just work in parallel as well. Regards, Andy On Wed, Feb 12, 2014 at 2:48 PM, Kalin Kanov ka...@cs.jhu.edu wrote: Hi Andy, Thank you for taking a close look at this and for the comments. That seems to have been indeed the issue. Best, Kalin On 12.2.2014 г. 14:40, Andy Bauer wrote: Hi Kalin, I think the issue is that your extents are wrong. The extents should be the index of the first and last point in each logical direction so it should be [0, 15, 0, 15, 0, 15] if you have a square grid with 4096 points. Note that this is the whole extent that the reader could provide even though subsequent filters may ask for a reduced extent. Also, in RequestData() you should get the requested extent with something like the following and take out the SetDimension() call: vtkInformation *outInfo = outputVector-GetInformationObject( outputPort); int subext[6]; outInfo-Get(vtkStreamingDemandDrivenPipeli ne::UPDATE_EXTENT(),subext); image-SetExtent(subext); Then use the subextent to fill in your scalars array since it may be less than what it could potentially provide (e.g. why read in all data when you only need a subset of that). I've filled in the vtkJHTDBReader.cxx code with some comments and changes. You should go through and review what I did since I can't test your code. Regards, Andy On Wed, Feb 12, 2014 at 1:47 PM, Kalin Kanov ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu wrote: Hi Andy, Thanks for the quick response. I am setting the extent to be [0,16,0,16,0,16], as follows: in the constructor: this-extent[0] = 0; this-extent[1] = 16; this-extent[2] = 0; this-extent[3] = 16; this-extent[4] = 0; this-extent[5] = 16; in RequestInformation(): outInfo-Set( vtkStreamingDemandDrivenPipeli__ne:: WHOLE_EXTENT(), this-extent, 6); Attached is the .vti file and the code. In the test harness I also have a vtkRenderer, which also displays the data as a 3d cube. On 12.2.2014 г. 13:30, Andy Bauer wrote: Hi Kalin, I'm thinking that maybe there is ghost level information that is wrong, or maybe extent information. I'm assuming that you're running the server in serial so in that case you shouldn't have any ghost levels. If your grid has 16 points in each direction than than the extent for that should be [i, i+15, j, j+15, k, k+15] for a single process (note that extents don't need to start from 0 but usually do). If your grid is 16 cells in each direction than the extent would be [i, i+16, j, j+16, k, k+16]. If that isn't the problem, dan you share your code and your vti file from your test harness? Regards, Andy On Wed, Feb 12, 2014 at 1:11 PM, Kalin Kanov ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu mailto:ka...@cs.jhu.edu wrote: Dear All, I am developing a custom ParaView reader for my data. I have a working plugin for ParaView that reads and displays the data. However, what I am getting in the 3D view is not as expected. My reader subclasses vtkImageAlgorithm and produces a 3D structured grid. When I load the data in ParaView I only see 3 of the surfaces of the cube (attached is a screenshot). Any idea why this would be happening? When I view the data in spreadsheet form all 4096 point (the testing cube is 16x16x16) have associated scalar data and the coordinates look good, but the 3D view displays only the left, right and bottom walls of the cube. Additionally, I also have a small test harness that uses my custom reader as input for a vtkXMLImageDataWriter and the resulting .vti file when loaded into ParaView and visualized looks good. Thank you, Kalin Kanov ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
[Paraview] Outline of multiple transforms
Hi all, I was curios to know if it is possible to draw an outline around several transformed domains. I have run a simulation of s periodic flow on a truncated domain. Upon importing the data, have added a couple of transformations to give the impression of a wider domain. However, unlike reflect, which merges copies of the original and mirrored domain, the transforms are separate items in the pipeline. I'm not sure how to draw a single outline around the original and transform domains. I would appreciate any advice. Dave/owa/redir.aspx?C=43c9a2c543674047b73d8b60494cURL=http%3a%2f%2fwww.uq.edu.au%2fhypersonics%2f ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
[Paraview] Paraview Stereo
Hello, I have a dual projector + polarizing lens setup. I'd like to get paraview working in stereo with this. Has anyone there (or on campus) gotten paraview to work in stereo mode with the old fashioned -two screen polarization format? PS: I know you can do R/B stereo to the monitor and I saw some obscure notes on this. Thanks in advance! ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
[Paraview] VRUI connection ParaView Crash
Hi, after some time in which i had to dedicate myself to other software, i finally had a chance to come back to paraview to work and develop on it. I'm trying to re-set it up on my 3-screens VR setup with magnetic tracking of the user position and wand and a wiimote to get the buttons. I have a VRUI server that joins the tracker and the wiimote, but there seems to be no way to get it working in ParaView. I tried with a VRPN server and it works correctly, tracking and all, but unfortunately i need the VRUI one to join buttons. As soon as i configure everything in the VRPlugin (i tried both ways, through the GUI and through the state file) and I start it, paraview gets stuck, mouse pointer hourglass shaped and no sign of life nor error message until i have to kill the process. I tried with the 3.98 and the 4.0, with the 4.1 i seem to have a mismatching between the client and server version and therefore the handshake seems to fail because of that. Any idea? Best, H ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview