C++ utility for writing large image files [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm working on some finite element analysis code, and one of our commonly used troubleshooting tools is a graphical output of the large matrices that define the physical problem. However, as the problem sizes become large, the tools I've used in the past (libpng, libharu pdf) begin to take extremely long times to write the images to file.
My question: can anyone recommend a high-performance C++ image library, capable of outputting large images in some standard format (e.g. png, tiff, etc) efficiently? Furthermore, the matrices to be plotted are VERY sparse, meaning that most of the image canvas is actually empty; so although an image's resolution may be almost a gigapixel, there would be only about 20-30 pixels per row maximum.

I'd try http://www.openexr.com/
OpenEXR comes with an SDK for reading and writing. I/O never requires having the entire bitmap in memory.

libvips is a venerable image-processing library that specializes in exactly this problem.

Related

C++ library to obtain regular meshes from a 3D file format such as STL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
It seems there are some libraries including CGAL to generate meshes from a 2D or 3D model.
Question: In C++ environment, what is the best way to obtain a set of regular nodes to represent an object that is given by a 3d file format such as the STL?
To explain the question, let me provide an example. In a 2D case, a square can be represented by the set of '1's and the empty space can be by the set of '0's.
Is there any C++ library that can deal with this task?
00000000000000
00000111000000
00000111000000
00000111000000
00000000000000
Thank you in advance.
CGAL it self is already a very good option, if you can match the licenses (many modules are GPL or must pay a fee for proprietary use). This answer shows an example of use.
Another complete library is the Point Clouds Library (PCL) (license compatible with commercial). If your input data is ordered (like the one shown in the question) you can use the pcl::OrganizedFastMesh class.
If your data is un-ordered,
then a pcl::GreedyProjectionTriangulation may be better.
Finally, if using PCL, you can save your triangle mesh to STL using [pcl::io::savePolygonFileSTL](http://docs.pointclouds.org/1.7.0/group__io.html#ga3223bdca3003262efbd8c475d4ab7cc6].
As a final note, better than trying to find a library that exactly matches your input format, find a library that can generate the result you want and then accommodate your input and output to it through convertors. Of course, if your input doesn't provide the required data, such as normals, then you must either compute it previously or search for another method ;).

Searching library for a 3D fft based convolution [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I have a large 3D matrix and a small 3D matrix which I want to use 3D fft based convolution to find the best match for my small 3D matrix in the larger matrix. Do you have any code in C++ that can do it?
Stackoverflow is no community where one can request a code then gets it done by us, yet we can help you find the necessary resources and information so you are able to do so for yourself (usually questions on how to use libraries and help on specific topics are ok).
Let's come to your question: you already mentioned that you want to use FFT which is by far the best approach - a suitable library would be FFTW, so please take a look at it and keep the following things in mind:
To improve performace try to pad to powers of two which will speed up the process a lot!
Using real FFT and not complex will simplify and speed up this, too.
Usually single precision should be enough to achieve the desired results.

Some tips for parsing [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I have been trying a couple libraries to load/parse my .obj model into my opengl program.
Here's some of them:
nate robins, GLM
obj2opengl(farthest one) by heiko
also a few other loaders that didn't work.
My main problem with these were undefined errors. And since I tried GLM from many different people (editors of the original code) then maybe it's something I'm doing wrong.
So my questions are:
What obj loader should I use for opengl (PC type)?
If I were to parse the obj file myself, then how should I save the vertices?(the fastest/most efficient) also choices with pros/cons are even better
I'm using Code Blocks/MinGW on windows 32 bit (7 and vista).
You might be interested in the (unfortunately named) Assimp library. While it is not a (fast) parser in and of itself, you can use it to produce an easy to parse format that contains only the data you are using, and it can load a lot of formats.
If you wish to parse the file yourself, it helps that the OBJ file format is very simple. I reccomend taking an equally simple approach - just bring in all the vertices into a vertex buffer and create an index buffer to use. Then render using Vertex Buffer Objects / Index Buffer Objects and just draw indexed triangles.

3D Graph plotting for C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to plot my simulation (which I do in a C++ application) for use in a Latex document (so I would prefer some vector output like EPS). My function is of 2 arguments, so I am after a 3D plot, ideally with colouring indicating the function value (similar to what Mathematica does). Could anyone recommend any library?
Why not use gnuplot? I use it for this sort of thing. If you really need a library, then I'd look at gnuplot++
MathGL have large set of 1D (curves), 2D (surfaces) and 3D (volume) plot types. It also have export to EPS and parse some of TeX formulas.
Take a look at QwtPlot3d (http://qwtplot3d.sourceforge.net/), if you can use Qt in your project.
(Basically it is OpenGL rendering library, but AFAIK it has ability to produce EPS output)
PS.I had never used it, but have experience in QwtPlot (related 2d ploting library), and it is pretty well designed and flexible library.
Edit:
From features list of this library:
"..."
"- Vector output (PostScript, EPS and PDF) via gl2ps"
"..."

C/C++ library for VTK IO [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I have a simulation in C++ which generates huge amount of data. Right now I am using MATLAB libraries to save the results as a .mat file, but eventually I will be needing an open source binary format. I don't want to implement my own binary format and ASCII is not an option. I heard that VTK provides .vtk binary file format for saving 3d data structures, which is exactly what I need. Is there a good C/C++ library for reading/writing VTK files?
Yes, there is a good library providing .vtk files I/O, and it is called... wait for it... VTK! :)
http://www.vtk.org/doc/release/4.2/html/classvtkUnstructuredGridWriter.html
http://www.vtk.org/doc/release/4.2/html/classvtkUnstructuredGridReader.html
(There are many other readers/writers to suit your data type).