How can I display an image sequence as a volume in ParaView? - vtk

As a replacement for ImageJ's 3D-Viewer I'm trying to display a sequence of microscopic images as a volume in ParaView 5.4.1. I tried following this guide which suggests to save the image sequence as a .raw file with ImageJ, open that in ParaView and manually enter the image dimensions. I'm not seeing the fields where I could enter image dimensions in ParaView though, and clicking "Apply" after loading the .raw file does nothing. Is there another way?

When you open the file, you are probably getting a dialog box titled "Open Data With..." and given a list of file formats that potentially match the file. Make sure you select "Raw (binary) Files". That is the one that reads images as a raw binary array of data and gives you lots of options to specify the size of the array (including reading the files as a 3D stack).
Don't use the one that says "RAW Files". That is a different mesh format used by some CAD programs.

Related

How to export a project in selected size tiles in JPEG or KMZ file type using QGIS?

'Convert map to raster' processing tool doesn't work for me. It doesn't have these file formats. Saving in other formats also doesn't allow me to open it.

apply same curve-color to tiff in batch in GIMP

I would like to apply a specific color curve to some 2000 .tif files.
I am a Windows user and so far I have used GIMP for photo editing.
Using Gimp 2.10 I was able to perform such task working on .JPG files using the batch Image Manipulation plug-in (bimp v 2.6; https://alessandrofrancesconi.it/projects/bimp/).
Work flow so far for Jpegs in GIMP-2.10:
Using I created a color curve working on a jpg file (Colors-> curves).
once happy with corrections I saved the curve in an external file ("myset") which hasbeen saved in '\User\appData\roaming\gimp\2.10\curves'
using bimp plug in I choose Add->color correction
in the new window that pop-up I then select only the checkbox "change the color curv from external file" (or similar, menus are not in english...sorry) and navigate to my "myset" curve file.
finally run the batch
When I tried to do the same BUT WITH the .tif files, I got warnings of the kind "unknown filed tag encountered" at the step of importing in bimp the images to process.
That said, I can open the individual tif files in Gimp (File -> open...).
When I do, I still get the warnings "unknown filed tag encountered", but i can click "OK" on the message window and continue importing the file.
Now the "import TIFF" window show me a "Page 1" icon in the top part, then I can choose if opening the file as "levels" or "image". Both choices seem to give the same result.
At that point I can apply my "myset" curve to the file from the tool Colors-> curves.
One potential solution I've been thinking of is to write a script to do this and call it from the command line. I found something along that line here: https://www.gimpusers.com/forums/gimp-user/11100-curves-spline-batch .
Unfortunately:
I have no experience in writing script-fu scripts and very few on command line.
looking at the example in the above link I cannot figure out how/where to point to the "myset" curve in the script.
looking into the Procedure Brouser I do not know which is the one corresponding to the Color->curve tool. ( possibly someting like gimp-drawable-curves-splines, but again I dont know how to have that refer to "myset")
A copy of my "myset" curve and a some .tif esample files can be found here.
Dows anyone have suggestion on perform batch curve color changes on these tif files similarly to what I describe for the jpg? I am open to other solution then GIMP (but for example I cannot open those tif in rawtherappe - don't know why - so that is less of an option)
IMPORTANT: the I need to preserve the tiff metadata (they're georeferenced)

Remove images (with transparency/alpha channel) from PDF

How to remove images with alpha channel (transparency) in a PDF file?
I need to remove all images with transparency from a PDF file because it needs to be optimized with pdf2ps and ps2pdf (to reduce filesize).. Postscript doesn't work properly when the PDF contains images with transparency and the PDF will be converted to one big image..
I have not managed to reproduce your problem.
For cons, I did the same treatment to compress my pdf except that I used pdftops instead of pdf2ps.
I hope it will help.
Sorry for my english (translate.google)
Clark,
It sounds like www.pstill.com will do everything you need and more in one tool. There is a Linux command line version available for a very reasonable price. I have used the tool on a few different PDF's for different reasons and it has always worked as advertised.
From their website.
Putting the 'Portable' back in PDF - PDF to PDF Transcoding
Your PDF cannot be printed on some printers or processed with some applications? PStill can sanitize, simplify, reprocess, flatten transparency and recompress PDF-Files, this process also known as 'transcoding' create a new PDF that has better compatibility, is often smaller in file size, can be optional encrypted/secured and contain only a uniform set of font types. Fonts can be normalized to plain PostScript Type 1 formats, can be subsetted, missing fonts included and bad fonts repaired/replaced. PStill can detect and remove duplicate elements in the PDF. Text can be converted to outlines which makes it perfect for creating 'fontless' PDF. Transcoding can be used to repair bad PDF or simplify the PDF structure so more limited output devices can process it.
Andrew.

Linux PdfToText function return blank text file

I've used a linux function to convert a list of PDF files to text.
Command:
pdftotext -htmlmeta
This work well for most of my files.
but for a small amount of them, this return me a blank text file.
My unsuccesssfull pdf files were not encrypted, not securised by user / password and they were not read only.
Converting PDFs to text is not a well-defined process. It can work awesome or not at all, depending on the PDF input.
Why is this? Because a PDF's task is mainly to represent the optics of a document, not the textual contents. PDFs can be everything from a pure text with positional information up to a pure graphics of the glyphs of the letters of the text. In the latter case one would need to run an OCR on the input in order to receive text information. This is not done by tools like pdftotext.
Sometimes the text in the PDF is scattered throughout the file, e. g. because first all standard-font letters are mentioned in the PDF, then, later in the file, all the italics-font letters are mentioned (of course with positional information, so a reader of the optical representation won't notice this, even if standard and italics are mixed throughout the text on the page). To rearrange this mess to a fluent text is a major task not very many converters are capable of.
So I guess all you can do is try some more converters for PDF to text (some are better than others, and some are better just for some specific input) or see that you can get the text from another source than the PDF files.

Hidden/Open words in an Image file such as PNG or JGP

As far as I can tell my question is not related to topics involved in Stenography or in the win.rar soluations I've seen to this where you are essentially hidding messages.
I am trying to figure out if there is a way to insert code into a file such as a jpg or png with a simple message, that could later be extracted by a program reading the file without having it encoded into the file either by slight differences in pixels or what have you in stenography.
I basically just want a tag along message that is a part of the file itself that is not brought up by the image reader but could perhaps be seen by a text reader of some kind.
I'm not sure how possible this is because I, for the most part don't understand the order/layout of the png/jgp/ect file aside from the RGB pixel code. How does it start, how does the image display tool know to stop displaying ect.
The way I'm envisioning it would be something like:
pngStartCode -> RGBinfo --> png end code so image reader knows to stop -> start sequence that some kind of reader will recognize (possibly a new text reader) -> written text wanted to be communicated -> endcodeforreader
I may just be rambling about something ridiculous here but please let me know if this is at least possible.
You can use following command(Windows command prompt)
Create a text file with your message, say "message.txt"
Now choose target file(it can be any file like a.jpg,a.png,a.exe,..etc), say "image.jpg"
Now execute follwing command
copy /b "image.jpg"+"message.txt" "NewImage.jpg"
Above command will combine files(in binary mode) and creats a new file(in this case NewImage.jpg). Now if anyone opens image they will just see noraml image. If you want to look at text, you have open it with any text editor(Notepad) and scroll down to last, there you can find text.
Here it wont chage any pixels or any thing to image, it just appends text to image.
It sounds like OP is asking about comment tags in the PNG specifications (i.e. adding data but without intent to hide it).
PNG files are broken into "Chunks". The image part is usually divided into several IDAT chunks; the color, size, etc are stored in an IHDR chunk, etc.
The iTXt, tEXt, and zTXt chunks are used for conveying text information associated with the image, so typically you'd look into using a tool to add those types of chunks. tEXt is for just plain text, zTXt is compressed.
More info on the PNG specification including what kinds of chunks are available can be found here, and you find chunk viewers on google.
For convenience at preset time (January 2021) here are a couple tools that will let you view, edit, and add chunks:
Windows 10: http://entropymine.com/jason/tweakpng/
Linux: https://www.systutorials.com/docs/linux/man/n-png/
Mac: https://apps.apple.com/us/app/inspectpng/id498851708?mt=12
NOTE: I do not vouch for the safety of any of the above links. Please use standard caution when downloading any file from the internet. If you don't have your own anti-virus, Virustotal has one online you can upload individual files to for free.

Resources