Paramecium test

Paramecia Test

The image works as the preview on my computer (when using my external hard drive as a source for the images – I tried storing images directly on my computer but there was not enough room, so the hard drive is necessary)

I don’t think I’m telling it to look in the correct place for the images… Files are uploaded to Box.com, in folders for the different zoom levels:

Paramecia folder in Box.com
Paramecia folder in Box.com

 

Here is the code I am using:

html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}

var moonTypeOptions = {
getTileUrl: function(coord, zoom) {
var normalizedCoord = getNormalizedCoord(coord, zoom);
if (!normalizedCoord) {
return null;
}
var bound = Math.pow(2, zoom);
return ‘https://app.box.com/files/0/f/1814786029/InfocusAnatomy_Paramecium‘ +
‘/’ + zoom + ‘/’ + normalizedCoord.x + ‘/’ +
normalizedCoord.x + ‘.jpg’;
},
tileSize: new google.maps.Size(256, 256),
maxZoom: 8,
minZoom: 0,
radius: 32768,
name: ‘Moon’
};

var moonMapType = new google.maps.ImageMapType(moonTypeOptions);

function initialize() {
var myLatlng = new google.maps.LatLng(0, 0);
var mapOptions = {
center: myLatlng,
zoom: 1,
streetViewControl: false,
mapTypeControlOptions: {
mapTypeIds: [‘moon’]
}
};

var map = new google.maps.Map(document.getElementById(‘map-canvas’),
mapOptions);
map.mapTypes.set(‘moon’, moonMapType);
map.setMapTypeId(‘moon’);
}

// Normalizes the coords that tiles repeat across the x axis (horizontally)
// like the standard Google map tiles.
function getNormalizedCoord(coord, zoom) {
var y = coord.y;
var x = coord.x;

// tile range in one direction range is dependent on zoom level
// 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc
var tileRange = 1 << zoom;

// don’t repeat across y-axis (vertically)
if (y = tileRange) {
return null;
}

// repeat across x-axis
if (x = tileRange) {
//x = (x % tileRange + tileRange) % tileRange;
return null;
}

return {
x: x,
y: y
};
}

google.maps.event.addDomListener(window, ‘load’, initialize);

Box.com is much better than the original “mywebspace” from UW, with more storage and a much more streamlined uploading system. It does log out periodically, but it is easier to go back and find where I need to pick back up, especially now that the tile images sorted into folders instead of one massive conglomeration.

Cricket is also in progress, and Onion is being re=done, with better representations of cellular organization as far as root nutrient absorption. Even though the onion was supposed to just be a test, I want it to be fully rendered instead.

Work Progressing

It’s been a while, but projects are still in the works.

At the present zoom level (with final image 32k x 32k pixels) the simplistic cellular structures that I had originally made for the onion are not large enough to quite convey the complex interactions that are happening with nutrient exchange and transportation, so I think this needs to get bumped up to 64k pixels… or change the zoom level to reflect a greater zoom than is actually represented (not my preferred route).

Grouping the tiles as jpegs within folders rather than as one massive lump sum has made uploading to Box much easier: each “zoom level” has its own separate group, so if an upload is interrupted, it is much easier to see where it needs to be resumed. The largest folder takes about 12 hours to upload, exponentially decreasing the loading time as folders become smaller.

In order to get additional direct source imagery specific to the items I am working on, I am constructing a low-tech travel-sized microscope-camera based on the designs shown in this video:

He has specific instructions here here as well.

I met the designer/inventor Kenji Yoshino through a friend of mine: Molly Rideout, who runs the artist residency Grin City Collective in Grinnell, Iowa. He was a resident artist there last summer and (among many of his creative endeavors) developed this microscope with the intention of making it a resource for doing work in various settings, as well as providing alternative options for schools or programs that do not have access to higher end microscopes. Many thanks to him for posting the instructions as a resource!

I will be picking up the plexiglass today, and hopefully constructing it after work! Having the flexibility to take images of what I am seeing through the microscope will save time when rendering the more detailed aspects of these drawings. The pictures won’t be the best, most amazing quality (I only have an iPod-touch that I will use to capture photos) but their primary use is for reference material, so I don’t have to draw with one eyeball glued to the eyepiece. The university has incredible imaging cameras as well, that can take really amazing high-resolution photographs, as well as more sophisticated view-screen microscopes with various capabilities (I am quite enamored of these and would love to have one sometime in the distant future) – but for my purposes, I am okay with this for now.

Maps and Tiles

The files for the project are quite large, it takes about 5 minutes to save the largest files. (I know, I know, of course a 32k x 32k image is going to take a long time, what did you expect? Well, I expect my computer to be magical, that’s all. The images for various zoom stages are composed separately (using the same outline as the basis to maintain consistency) and I will be substituting more detailed renderings as needed for the appropriate levels of magnification. I had them grouped as layers for a very short period of time, until it was clear that additional layers seemed to exponentially increase the time required to save my file. This may seem like child’s play to an experienced programer, but I am enjoying learning about it.

In order to be most compatible with the google API, the images are made with these particular pixel dimensions:

256 x 256 ——— 1x magnification
512 x 512 ——— 2x
1024 x 1024 —— 4x
2048 x 2048 —— 8x
4096 x 4096 —— 16x
8192 x 8192 —— 32x (slightly smaller than the 40x equivalent magnification
16,384 x 16,384 — 64x
32,768 x 32,768 — 128x (slightly larger than the 100x equivalent magnification)

I do realize these won’t be precisely accurate, since the first onion image is not exactly at life size – but the 1024 size gets closer to the actual size so I am rounding the estimated measurements up one degree (so the 16,384 is closer to the “40x equivalent”, and the 32k image will be rendered slightly smaller than “100x equivalent”). This should not be an issue for the cricket and for the Paramecium, since the 256 x 256 should be more than enough space for “life size” (a single slide, in the case of the unicellular organism). For larger life forms in the future, these measurements will be adjusted accordingly.

Prof. Kevin Ponto found software for splitting images into ready-made tiles for use in Google Maps API formats: Maptiler Free online, which promises incredibly quick working time: (2 minutes as opposed to 122 minutes, and half the finished file size). This program has very good prospects but is limited to 10,000 px images and it leaves a watermark on the image that is tiled. I will try this one to see how it compares to another free version from Mike Courturier: Tile Generator – test map loading this weekend, hopefully.

Maptiler Start: The next level (costs ~$28 USD, not bad) does not put a watermark on, but it is still limited to 10k pixels and requires(maybe?) 2 CPU cores. That end size will bring us to approximately 40x zoom, which equates to the lowest lens on a standard compound microscope. I have been developing the drawings at 32,768px, which gets me slightly above 100x magnification, which would be ideal. The highest level of magnification would be 400x magnification, but that may be reserved for the Paramecium… (which I probably should have started with, being a single-celled organism…)

Maptiler Pro: The next (and most expensive level at ~$560 USD) offers unlimited size, so I could get the zoom I want, but in addition to the hefty price tag it requires (maybe?) 4 CPU processors.

I think I’m willing to wait a few hours for images to tile. We’ll see though, perhaps a step up would be worth it.

Also posted on jwhisenant.wordpress.com

Conversations and Reference Sources

I have had several helpful conversations over the past week, and there have been many good thoughts and suggestions regarding this project.

Kandis Elliot – Scientific Illustrator: Botany Dept./Zoology Dept. 
Kandis had lots of advice and was very generous about sharing her process when approaching scientific illustration – after meeting with her I immediately went and made a reference sheet for Photoshop keyboard shortcuts (I knew the basics, but when you are able to fly through the toolset, it cuts your work time down significantly). We talked about information design, image rendering, and dinosaurs!

Sarah Friedrich – Scientific Illustrator and Media Specialist: Botany Dept.
It was very fun to speak with Sarah (after I went to the correct floor…) It is incredibly helpful to explain the scope of a project to different people, even just to articulate my own thought process out loud, as well as hearing alternate perspectives. We talked about layers of design (especially for organisms with multiple systems to represent: digestive/nervous/endocrine/etc) and were tossing around ideas of how that might be approached as a layering process to integrate the system representation, or if they would be completely separate.

Mike Clayton – Photographer/Collection Manager: Botany Dept.
An incredible resource for imaging suggestions – and generously offered the use of the Botany Dept compound microscope with a screen viewer, on Fridays. In addition to the comprehensive resources of the UW, he recommended looking for existing slides from Ripon Microslide for any specific botanical material. He has also compiled some fantastic images of plant material using a nice quality flatbed scanner (one of the many helpful tips: for 3D objects that you don’t want smashed against the glass: scan with an open top in a dark room – the resulting images are dramatically lit with a deep black background).

Some images from the UW collections: excellent reference points for 40x versus 100x magnification. Right now the only available slides are of root tips, so I am growing an onion from a common bulb in order to get leaf cell samples… (I had one in the kitchen but my industrious housemate discarded it… oh well) For the actual rendering, I am drawing one root’s worth and use it for the other root tips as well, adjusting for different curves, etc).

Image from UW Botany Department, scanned by Mike Clayton

Onion_UWBotanyDept_AlliumRootMetaphaseSpindle

Marianne Spoon – Chief Communications Officer, Science Writer for the Wisconsin Institute of Discovery
We met to go over the scope and plans for this project. Marianne had some great presentation format suggestions – I had been focusing mainly on the individual images but she was talking about how viewers might encounter the image options on a hypothetical website (i.e. possibly in a compiled image with hotspots on an where people could click on an onion/cricket/etc and then go to the zoomable map view. She was also wondering if the image would go even farther out, zooming out to a room, a building, a country, a planet. Perhaps something to consider in the future – maybe seamlessly link to a separate zoom map, since my files are getting quite large just from a “lifesize” viewpoint! She made me really start thinking about the larger integration of these anatomical maps into their intended application or something that I might not have anticipated!

In other news, I have several reference drawings from our entomology lab cricket dissections last week, so I have started compiling initial sketches of the internal systems for an upcoming map.

(also posted on jwhisenant.wordpress.com)