Is there a way to add error bars to scatter plot data using VTK? I am currently plotting point data using the C++ API; there is uncertainty associated with the data I am trying to plot which I would like to visualise also.
I can't find any obvious references in the documentation to error bars; the only mention I have found is in this Kitware presentation from 2011, which doesn't seem to be a function that exists.
Sample code snippet:
// Chart source data is populated etc...
vtkPlot* sampleScatter = chartXY->AddPlot(vtkChart::POINTS);
sampleScatter->SetInputData(chartDataTable, 0, 1);
// Here is where I would like to add the error bars -
// below method is from the link, and does not work
vtkPlotPoints::SafeDownCast(sampleScatter)->SetErrorArray(errorData.GetPointer());
// Chart is rendered...
where chartXY is a vtkChartXY object and chartDataTable is a vtkTable containing the x and y data in columns 0 and 1.
Is there a way to populate error data for visualisation in a similar fashion to the above, or will I have to roll my own chart type?
It turns out that this is not a capability that exists in VTK at the moment.
I have developed a basic capability to do this, which is currently the subject of a merge request in the VTK repository. Will update if/when this has been merged in and the capability is available.
I'm using Arrayfire to make a 2D heat transfer simulation. My dataset is a matrix of temperatures and I want to vizualize it as a heatmap. I need to produce frames of the colored dataset and save it as an image on the disk. So each temperature in my dataset has to be mapped to a color according to a certain color scheme.
I found that you can render the dataset in a window with a colormap using fig():
http://blog.accelereyes.com/blog/2013/07/03/arrayfire-examples-part-7-of-8-pde/
I also found that the colormaps available:
http://arrayfire.org/docs/defines_8h.htm#a553ceda8a1d8946efac3b08e642574ae
My plan so far has been to render the colored dataset using window.image() in a hidden window and then extract an array/image from the result so I can save this result using saveImage(). But I cannot find a way to extract the image rendered by the window.
Is there a better way to do this using the image processing functions? I would like to avoid defining my own color scheme. (i.e. making my own function that maps a temperature to a color)
I have a shapefile which came from the Rural Payments Agency which is the complete set of fields for ourfarm. I would like to use this to find the bounding box for the download. The shapefile is encoded (according to the .prj file) using the British National Grid, GCS_OSGB_1936.
Having downloaded the relevant bit of the sensor data (I am interested in the Sentinel-2 visible and near infra-red so that I can do NDVI and EVI displays) I then want to clip the images to fit the fields.
I tried loading the sensor data and the shapefile, but I must have got the coordinate systems wrong because although I can zoom in on the farm on the sensor data, if I zoom in on the shapefile the sensor data is nowhere to be found.
Any pointers?
Try to change the CRS of the Vector file. Import in QGIS > Right Click > Set Layer CRS > Select the CRS. Hope This helps!
How can i get the pixel data from .dcm file as an array variable using DCMTK library?
I'm using this site for preference and it didn't work, the data result is very different from the original picture.
The code you referenced just extracts the pixel data from the corresponding attribute. But there is much more to this. Different header elements determine how the pixel data is to be interpreted. For this, the class DicomImage can be used. You can either use it to normalize the data to an array of (signed|unsigned) (char|short|int) using getInterData() or for rendering purposes using getOutputData().
I am using the map service at http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer, which gives me a world map.
I have a shape file (.prj) that looks like this:
PROJCS["UTM:10N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["CLARKE 1866",6378206.4,294.9786982]],PRIMEM["GREENWICH",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["Central_Meridian",-123.0],PARAMETER["Latitude_Of_Origin",0.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],UNIT["METER",1.0]]
The locations relevant to the shape file are in western Canada (UTM:10N). Research seems to indicate that this is WKID 26710.
If I create the map layer and set the SpatialReference to 26710, no map shows. If I set SpatialReference to 102100, I get a map, but my points are in eastern France. This tells me that my reference is off.
I am processing the shape files, but I do not create or own them. How would you go about getting them to position themselves correctly in Canada? It seems that the answer would be to "get the right Spatial Reference", but all the searching I have done says that that is 26710.
The map service you're using only plots geometries supplied in the 102100 projection. If you have access to an ArcGIS Geometry server, you can convert your data points from the source projection to the one required by the map service. See http://resources.esri.com/help/9.3/arcgisserver/apis/rest/project.html
For example, if you have a point whose coordinates in the 26710 wkid are (491800, 5456280), you could do something like
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/project?inSR=26710&outSR=102100&geometries=%7B%22geometryType%22%3A%22esriGeometryPoint%22%2C%22geometries%22%3A%5B%7B%22x%22%3A491800%2C%22y%22%3A5456280%7D%5D%7D&f=pjson
The x and y coodinates in that result should show up somewhere around Vancouver on the map service you linked.