VTK display multiple images - image

Does someone knows how to display multiple images using ActiViz or VTK?
I have a RenderWindowControl, I would like to either display all the images like in a list in there or add multiple RenderWindowControls to display the multiple images..
Thanks!

You have some choices, for the task of visualize multiple images. I hope that at least one of them represents what you want to achieve:
1- Using multiple render windows. Basically, the example provided in the link creates an array of vtkRenderWindowInteractor objects, so that you can visualize multiple images.
2 - Using a single render window with viewports. The render window is splitted into viewports (renderer->SetViewport is the key, here), so that you can visualize n images at a time, where n is the number of viewports.
3 - Using the "slices" approach (the example works on DICOM files). This implements the "list" behaviour, as you said in your question. Basically, you visualize an image at a time, but you can navigate through them simply by pressing the arrow keys. The example derives the vtkInteractorStyleImage class to catch the events regarding key pressures.

Related

Mosaicking PDF documents?

I have (or, rather, will soon have) a number of maps created in ArcGIS 10.0 and exported as PDF documents. The maps all show contiguous areas, being rather like the pages in a map book. There will also be a smaller-scale map depicting the entire area (let's call it the "study area"), but with less detail, rather like that page of a map atlas that shows what page depicts what area.
I wonder if there is any way to create thumbnails of the larger-scale maps and mosaic them such as to create an index map of the study area. A user would then be able to see, for a particular point on the smaller-scale map, which of the larger-scale maps depicts that part of the study area. (And perhaps see that map by clicking on the larger map?) Does anyone have any ideas I can implement this? I would prefer exporting the maps in PDF format, but, if I can't do all of the above with PDF, then any other format to which a map can be exported from ArcGIS, such as JPG or TIF, will work.
You should be able to create a PDF which does this.
What you need to do is render each page to a small image.
Then collect each of these images and add them as a mosaic to an index page.
Then put links from each small image back to the original PDF page.
If the hierarchy was more than one level deep you could repeat the process.
You need a PDF component to do this. What you want in terms of features is something which does decent PDF rendering. It's an easy thing to do badly and a difficult thing to do well.
ABCpdf .NET does good quality rendering so it's what I would suggest, but then I would because I work on it. :-)

Change icon of markercluster depending on marker type inside the cluster

I have a map with markers of at this time two different types: photos and blog posts. I would like to use a clustering system, preferably MarkerClusterer.
Is there a way to change the marker icon dynamically, or in other words, depending on what kinds of marker (photos or posts) are inside the cluster? For example, if the cluster only consists of photos, I would like to display some sort of camera icon, if there are only posts inside the cluster, I might want to display a letter. And if all types of markers are inside the cluster, I would like to use some sort of combined icon.
Can I somehow insert this check where I assign the URL of the icon in MarkerStyleOptions?
A bonus would be to also display the amount of markers of each type in the icon, i.e. two numbers.
Does anyone see a way to do this without having to change the source code?
I guess the simplest option is to keep each marker type in a seperate clusters ...
You must create a different array of marker for each group that you created. And try to create a MarkerCluster for each one.

Qt - using Widgets and QLabel to display multiple images

So currently I am able to display images via URL's using QLabel, QNetworkManager and QPixmap. And then to display the image I use something like label->show(). Essentially I follow the same steps as in the pseudocode in this link:
http://developer.qt.nokia.com/forums/viewthread/7010
Now I am still somewhat new to Qt and am having difficulty extending this. What I want to do is be able to display multiple images from different URL's into essentially the same container. So basically I want to see two images in the same container/window. These images are specified by their width, height, x position and y position in the main window/container. I know that I should use widgets but I am not sure what exactly should I use? QFrame? QHBLayout? QScrollArea? etc. Any help would be appreciated.
You can use many QLabels inside a Layout to get the effect you want. The way you want to lay it out is up to you, and there's more than one layout manager. There's things like the grid layout, the box layout, etc. Have a look here for layouts. You can look at it in this simplified way:
One window has a layout and a layout has many items in it.
http://doc.qt.nokia.com/latest/layout.html
In reality widgets can contain many other widgets. To position them properly, you use the layout.

Plotting several jpeg images in a single display

I need to plot and display several jpeg images in a single combined display (or canvas?). For example, suppose I have images {a,b,c,d}.jpg, each of different size, and I would like to plot them on one page in a 2x2 grid. It would be also nice to be able to set a title for each subplot.
I've been thoroughly looking for a solution, but couldn't find out how to do it, so any ideas would really help. I would preferably use a solution that is based on the EBImage package.
There are two ways how to arrange several plots with base graph functions, namely par(mfrow=c(rows,columns)) (substitute rows and columns with integers) and layout(mat) where mat is a matrix like matrix(c(1,2,3,4)).
For further info see ?par, ?layout, and especially Quick-R: Combining Plots.
However, as your question is about images I don't know if it helps you at all. If not, I am sorry for misinterpreting your question.
To add to Henriks solution, a rather convenient way of using the par() function is:
jpeg(filename="somefile.jpg")
op <- par(mfrow=c(2,2)
#plot the plots you want
par(op)
dev.off()
This way, you put the parameters back to the old state after you ran the code. Be aware of the fact this is NOT true if one of the plots gave an error.
Be aware of the fact that R always put the plots in the same order. Using mfrow fills the grid row by row. If you use mfcol instead of mfrow in the code, you fill up column by column.
Layout is a whole different story. Here you can define in which order the plots have to be placed. So layout(matrix(1:4,nrow=2) does the same as par(mfcol=c(2,2)). But layout(matrix(c(1,4,3,2),ncol=2)) places the first plot lefttop, the next one rightbottom, the third one righttop, and the last one leftbottom.
Every plot is completely independent, so the titles you specify using the option main are printed as well. If you want to have more flexibility, you should take a look at lattice plots.
If you do not want the images in a regular grid (the different sizes could imply this), then you might consider using the subplot function from the TeachingDemos package. The last example in the help page shows using an image as a plotting character, just modify to use your different images and sizes/locations.
The ms.image function (same package) used with my.symbols is another possibility.

Word VBA checkboxes with link to image that needs to be built up

I am having problems with a table containing checkboxes in Word.
I am working with a table containing 10 checkboxes. Next to this table, there is an image.
When the user checks one of the checkboxes, something has to be added to the image, i.e. the image is further completed.
However, the order of checking the checkboxes is not fixed or defined, so there are lots of different combinations.
Is there a way to add the additional parts to the original image, linked to the checkboxes? Or is this way too advanced for Word?
Word doesn't have this type of built-in functionality with images. There are too many state combinations for the checkboxes to make an image for each state in advance. One possibility could be to find a dll or ocx and draw the image programatically (advanced). Another would be to edit your image in photoshop and cut it up into 10 separate files using a transparent background. You could then add and remove layers to wherever you are displaying your image and control the z-ordering with vb.

Resources