How to visualize vtk data set with only point data - c++

I have a vtk dataset with only point data but no cell data. I would like to visualize the dataset as point cloud. When I read the dataset as polyData it wouldn’t show anything on the screen. One work around I did was first writing the dataset as .xyz files, then read from the .xyz files and visualize. Another way I came up with is inserting the points as vertices manually.
Are there any neater ways to achieve this goal?
Thank you very much!

You may check out the vtkVertexGlyphFilter class:
https://vtk.org/doc/nightly/html/classvtkVertexGlyphFilter.html

Related

convert vtk point data to cell data

I want to convert my vtk point data files to cell data files with a specific cell size, my data is basically 100,000 points data moving in a cylinder, and those points have several variables such as velocity and coordination. could anyone help me out with this problem?
I try to use paraview to give them volumn but cannot be a cylinder. The "point data to cell data" filter cannot save my variables correctly, anyone can help with this case? sorry I cannot share my data due to some other reasons, maybe some hints could help me out of this.
Many thanks in advance!

Power BI maps: something in between ArcGIS Maps and Shape Maps

I'm trying to create a colored heat map on some polygons (originally a .kmz file that I converted to TopoJSON - .json with mapshaper.org) and overlay on them a few coordinate points.
I tried first with ArcGis: I used Longitude and Latitude to visualize the location of certain objects and then I overlapped a layer I found online on ArcGis (that's the same I would like to use). The problem is that I cannot color the polygons in this layer and it seems not possible (https://community.powerbi.com/t5/Desktop/ArcGIS-geographic-ID-mapped-onto-a-polygon-layer/m-p/339432). I cannot even upload the data on ArcGis because the data are private company data.
Then I tried with Shape Map: I uploaded the TopoJson and colored them with the data I had associated with these zones, but I cannot find a way to display the objects with coordinates on top of them.
Do you have any suggestion on what can I do? or is it an impossible task at the moment?
I can show here the results (the dots with the coordinates are in the center of the image on the left):
Here there are some mock up data and the PBI file I created: https://drive.google.com/open?id=1rloRkCdi0-M-4ljPdOU9cxg_KpcU5GnT
Pay attention to data format: I converted some of them during the import.
Thanks, any help is appreciated.
It looks like this is not possible to be achieved in Power BI at the moment:
https://community.powerbi.com/t5/Desktop/Shape-Map-ArcGIS-Map-can-I-combine-them/m-p/838523#M402722

Extract region from a Curvilinear satellite Dataset

I have satellite swath data from MODIS and need to extract a subset (region) of data to analyze (NOT PLOT). I am trying to find the best way to do this with out loops which can be slow. In the past I have used set.intersect but this does not work on 2D data.
My issue is both Lat and Lon are 2D and I need to find the indices where my conditions are met (lat>=x1)&(lat<=x2) and similar for lon. and then use those 2D indices to slice my main data set (Aerosol Optical Depth)
Latitude Sample
Longitude Sample
Aerosol MetaData
Code so Far
Normally (for 1D lat/lon) I would used Opt_Depth_Land[:,goodlat,goodlon] to extract my data but this does not work for this type of data set.
Any Help would be greatly appreciated.
valid_lat=(lat>=user_lat-radius)&(lat<=user_lat+radius)
valid_lon=(lon>=user_lon-radius)&(lon<=user_lon+radius)
Valid_Coord=np.where((valid_lat==True)&(valid_lon==True))

how to query the database to return all zip codes with a given distance (ie 5 miles) from a given zip code using geopy

Hi frens I am using geopy to calculate the latitude and longitude. Now I want to get the list of areas given distance from a zipcode.How to get that?
Well, as I can see, geopy doesn't have any built-in capability to get a list of areas around some coordinates.
But you can use a workaround. Take your geocode and calculate coordinates (latitue and longitude). Then imagine a grid on the map with a cell size equal to area of the smallest one you need to find around your location.
Use geopy to get an area name belonging to the each cell corner of your grid. Is that ok for you? It will get you some kind of approximation because a grid is not a circle and you may miss some small areas. But I think in most cases the solution will work fine.
It is much easier to locate zipcodes inside a rectangle than in a circle so I would recommend that you approximate your problem by looking for zipcodes inside a given rectangle.
Here are answers to the question of how to get list of zipcodes in given polygone: Find zipcodes inside polygon shape using google maps api
Summary
You need geometry for each zipcode. Once you have that you need to be able to query it using database that supports geoquery. One such database is Google's Fusion Table and there is already a geometry data table for zipcodes available here: https://www.google.com/fusiontables/DataSource?docid=1AxB511DayCdtmyBuYOIPHIe_WM9iG87Q3jKh6EQ#rows:id=1
Here's the sample query for Fusion Table data.
Another approach is server side code using PHP and CSV data. Here's live demo: http://daim.snm.ku.dk/demo/zip/. The page also has download for code.
If you use any of above technique please make sure to upvote answers of original authors :).

Is there a way to use a Custom cross-sectional slicer of 3d image data?

I mean, is there a way to use the current slicer to show a sectional slice (not aligned with the canonical Axis) of the 3D image data? or better, a sectional slice of a predefined size.
If there is no exists, how can I contribute with this ??
Regards,
P
currently this is not possible but you are very welcome to contribute.
the parsers of NRRD and MGH/MGZ format store a 3D array of the image. All X.slices are configured using a front and an up vector.. now we only have to link the X.slice to grab the right values from the 3D array and then create a widget so it is possible to reslice/reformat on the fly. Sounds good?