I have been given the task to create an application that will scan a directory containing .stl files and generate jpgs thumnails of the models, no viewer or manipulation required. Is there any solution available or should I create my own?
Assimp claims to be able to read .stl files, perhaps you could prepare a small wrapper around the API that loads the model, captures the framebuffer and saves an image.
Related
I print out data from C/C++ simulation code to vtk files at each time step. I create numbered data files (e.g. data.000.vtk, data.001.vtk, …).
I am having trouble with including the time from each calculation step in these vtk files that contains structured grid data so that I can view time (seconds) by paraView during animation.
Is that possible in any way? Your help is really appreciated.
Unfortunately, there is no way to record the simulation time in the legacy VTK file format. Thus, if you want to pass the time from the simulation to ParaView, you will need to use a different file format.
I think the easiest way to record the simulation time is to use a ParaView Data (PVD) file. A PVD file is a simple XML file that captures metadata about a group of data files, and time value information is one of the things that can be captured. A brief description of the PVD format is given at http://www.paraview.org/Wiki/ParaView/Data_formats#PVD_File_Format. The example on that page has "timestep" values that are integers starting at 0, but you can replace them with any sequence of floating point numbers.
The PVD file itself does not hold the data itself. Rather, it points to other files that have the actual data. The data files it points to have to be in the newer XML-based VTK file formats (vti, vtr, or vts depending on the nature of your structured data). The XML-based VTK file format is also documented in http://www.vtk.org/VTK/img/file-formats.pdf (after the documentation for the legacy VTK format).
I´m trying to use the route-me framework together with C++ library libosmscout.
What I have done so far:
import OSM data into libosmscout format
compiling the iOS example-project from libosmscout-repo
The example project only draws one image of the map depending on given lat, long and zoom-factor.
What I want to do is, using the map view functionality of route-me but with map source data from libosmscout.
Is there anybody who has been managed this problem or could give me some hints?
I'm trying to do exactly the same thing.
But I haven' been able to compile the libosmscout for iOS up to now.
Anyway, I'm no sure how comfortable you are with route-me but I'm gonna try and answer your question.
If you are going to use libosmscout to leverage map data form osm xml or pbf files (probably for offline use) you're gonna need to implement a new MapSource and write the code yourself.
you'd better inherit from RMAbstractWebMapSource and implement imageForTile:tile inCache:tileCache method to meet your requirements. Route-me is a tile based map viewer, therefore you need to convert those vector data to tiles, for that you're gonna need to convert tile requests to boundingbox (a few examples are available in OSM wiki) and then try and extract the data from your OSM file and pass it to route-me as an image instance (a png for example).
Don't forget that Route-me caches loaded images, so you have to consider passing the right image for future uses. don't be fooled with the fact that your data is on device, reading vector files can be as demanding as reading raster files from web.
I am working on a image processing project. I am not familiar with html. Here is what I think.
My C++ application is able to read an image and write the image to file after processing. The procedural is that user can click mouse in a fixed region of my web, and the position data could be passed as parameter to my application, and then my C++ application will use the position data to process the image and output image to file, finally my web display the image.
So is that possible to implement this?
I'm afraid it's not possible only with HTML.
It should be possible with any server-side scripts written in PHP (for example). Anyway, you can make you program to watch folder uploaded and processed images save into another folder. You will need PHP or something like this though.
I have thousands of psd files to save as png. The psd files are not different, except for a small text in the center of a image. Is there a way to automate the job?
Yes. Open your actions window. Create new action. Record yourself opening, saving the file as png and closing the file.
Then under File -> Automate -> Batch. Point it to your psd folder and select your action. It should run through the files saving them as pngs.
A quick google search may help if you're new to actions.
edited per author input :}
XnView does the job pretty well. It can batch convert most files into most formats. It also has batch transformations and batch renaming among other things.
I use it regularly to convert PSDs to JPG/PNG/GIF.
I would use Irfanview 's powerful batch engine. Free and super-fast.
Go to the Folder in Irfanview Thumnails
Select all files
Rightclick and "Start batch dialog with selected files"
Select PNG as output format.
Yes you can make a Photoshop action to save the png and than run it via batch. This unfortunately gets tricky when you want to use this action option and specify the destination where the processed files are saved.
Enter Dr. (Russell) Brown’s Image Processor Pro, an extension for Photoshop that does exactly what most people need. It's dead simple and can even stack multiple processes and output formats/destinations to each file.
It's part of Dr. Brown’s Services
- http://russellbrown.com/scripts.html
I need an animation in my program. My designer draws animation in Flash and provides me with *.fla file. All I need is to grab 30-40 PNGs from this file and store them within my internal storage.
Is it possible grab resources from *.fla with C++ ? Probably, some Adobe OLE objects can help?
Please, advice.
Thanks in advance.
If I asked an artist to make me an icon I wouldn't expect to need to write code to convert a .3DS model into a usable icon format.
You can save yourself a lot of time and hassle by having your designer use File->Export and give you PNGs of the layers and frames instead of a .FLA file if that's the format you require for your implementation.
If that's not possible for some reason then you can probably find a flash decompiler that has a command line option which you could launch from your program to extract assets as part of your loading sequence but that is generally frowned upon because this is not the intended use of the proprietary format for .swf/.fla anymore than you should design applications to extract source code from a binary executable.
Assuming
You are using CS5
The assets used internally in the FLA are already PNG's as you want them to be.
Then simply get the FLA saved as a XFL file, and you will be able to grab them from the library folder ( but then why not just get them to mail you the pngs ? )
So if for some reason you can only get access to the fla and not the designer, then you can do it programatically by renaming the fla to .zip, extracting.. and you have the XFL format.