ImageJ - assigning different opaqueness to different colours - colors

I try to create a 3D video using ImageJ and one of its plugins 3DViewer.
My image came from a 8-bit ANALYZE file. After opening it in ImageJ, I used the LUT to assign a colour to each of 4 entries. Is there a way to change the opaqueness of each colour? For example, red needs to be transparent, where as blue and green should be solid.
Many thanks for your time.

This may not be the best solution, but it worked. I saved the original NIfTI file as two separate files (one contains the entires that will be opaque and another with the entires that will be transparent). I opened both of them on ImageJ, launched 3DViewer with the first image, then added the one that needs to be transparent. There's an option in 3DViewer for making the image transparent.

Related

Creating an image whith GIMP hiding another image unless we add a color filter in real life

The idea is like the inverse of Ishihara test (http://www.colour-blindness.com/colour-blindness-tests/ishihara-colour-test-plates/).
I want to create with GIMP an image that showing something and then if I add a color layer, for exemple green glasses, then I see something new appearing.
I've searching far in Google and so but didn't found anything. Do you know how would I make this?
The Ishihara tests use the principle of combining things color blind persons cannot differentiate.
Coloured glass filters will only remove other colours from what you see. They don't add something. Therefor it is not possible to create a digital image that contains no information unless seen through a colour filter.
The only thing you can do is overlap your "hidden" information with high contrast colour noise.
Like here:
Using the glasses / filter only improves the visibility. The information is not added. It was always there.

Coloured textures for POIs

I was trying to use a coloured texture (PNG 24/RGB) for a POI (bicycle_parking) and it was not being rendered. It was added properly as a texture, it just won't be rendered on the POI.
After some testing I came to believe that POIs only accept grayscale textures that can later be filled up with a color. Is this right?
I also found out that the icon needs to be of a specific size (I got it working only at 32x32 pixels and 512x512, but the scaling did not make it look good). Is there any information regarding this?
Now I have a grayscale icon (mostly white) but the fill color does not change the white as expected. This is as far as I got..
Here's a set of icons similar to the ones I need to render into POIs
How could I achieve adding this type of icons as the texture of a POI? Workarounds/hacks are welcome as well :)
Thanks!
The texture of the Poi must have a size that is a power of 2 and goes from 32x32 up until 512x512. Also make sure that the colour code of that image is RGB anything else wont work. For the best visual result you have to create 3 sets of pngs for different screen densities, for example see heatmap_legend.png then look at heatmap_legend#2x.png and heatmap_legend#3x.png, you can find them in the "common" folder.
So turns out that the color wasn't a problem after all. It was quite tricky to get one image working, but once I had the image working, adding color to it and saving the PNG worked just fine.
The problem with the image size I experienced is still happening. You need to export it in 32x32, 64x64 or 96x96 in order to StyleEditor not to crash when opening the file.

vtkImageViewer2 not rendering until I reset

I've showed a dicom image successfully with vtkImageviewer. Then I realized that vtkImageviewer2 would be more suitable, as I needed interactors and load images with slices, maybe 3d, etc
So I changed to vtkImageviewer2. Then I just see a white image. All white.
But my surprise was that, adding the render window interactor, when I press r... the image appears! So I looked into the class code. I saw the reset event and how it sets color window and color level. I've tried doing this, with poor results.
Why do I have to reset the window/level to see the image? I can do zoom, and rotate... around the white plane.
I did a widget->Update() or a imageViewer->Render() with the same result.
The Window Width/Level value is not computed initially, the default values are W255/L127.
It is necessary to set appropriate values. i.e. from Dicom Header Information or compute them by yourself.
myVtkImageViewer2->SetColorWindow(myWidthValue);
myVtkImageViewer2->SetColorLevel(myLevelValue);
Setup window/level values from your vtkImageActor:
vtkImageActor->GetProperty()->SetColorWindow(20);
vtkImageActor->GetProperty()->SetColorLevel(10);

Custom FeedCount. Acording to which rule FeedBurner converts colors?

I am traying to prepare own dynamicly generated FeedCount for my own subscription service. I think this will be a good idea to support convention for setting colors via URL which is well known from FeedBurner,
http://feeds.feedburner.com/~fc/Ekundelekpl?bg=99CCFF&fg=000000&anim=0
this URLs produce such image.
fg is means a text color, bg means here a dark blue color. However light blue (ccffff) is here generated according to some rule.
Is this a some kind popular convert color convention, which is well known in webdeveloper/designers world?
I checked few other pairs of color, but I count figure out what the rule is. I don't want to hardcode all colors supported by FeedBurner.
[EDIT]
There is 216 available colors. Here is twelve pairs which I have extracted:
000000,7e7e7e
000033,8a8a8a
000066,909090
000099,9999CC
0000CC,9999FF
0000FF,9999FF
006600,909090
006633,99CC99
006666,A2A2A2
006699,99CCCC
0066CC,99CCFF
0066FF,99CCFF
I did it in another way.
I decided to use feedburner as template. I download proper image and override parts which interest me.
https://github.com/noisy/eGazeciarzFeedCount

How to display a .bmp in an NSImageView for MacOs so that a certain color is transparent?

I have some .bmp files that have some color (maybe black) that is supposed to show as transparent when the graphic is displayed on top a form, so the form color comes through the transparent areas. But by default, when I put these images in an Image View, the black/transparent areas show up as BLACK!
I'm thinking I need to either:
- alter how the NSImageView shows the image, so that a certain color is transparent, or
- modify the .bmp files somehow to make that color suitable for transparency in an NSImageView
But I don't know enough about graphics files, transparency(alpha), NSImageView, nor the image editing tools. I'm trying to use Gimp, but...not sure what I'm doing yet. It seems like there is already a color that should be transparent in the current .bmp file.
I'm sure its something simple for setting NSImageView, or editing my file, or perhaps making a mask for the image, but I don't know how yet. I've looked at various filters in IB for NSImageView, but have not found where to set the transparent color, nor how to grab that color from the image file to make sure I use the correct value.
Thanks in advance for any assistance. (I tried to post some images, but because I'm new, I could not.)
Beau
I'm not a Cocoa developer, but in Gimp try adding an alpha channel to your image (a layer mask, perhaps) then saving as a 32-bit PNG image (with an alpha channel), then load that PNG directly into your NSImageView. If you want to make the black pixels transparent in Gimp use the magic-wand tool to select them (use magic-wand with 0 tolerance) and just delete the contents of the selection then save as a PNG directly.

Resources