Tuesday, October 27, 2015

How to view a .MRC file on Windows7 64bit?

Update Aug 2017

Download Fiji from imagej.net.

Old Story

Go to http://imagej.nih.gov/ij/download.html and download "ImageJ 1.47 bundled with 64-bit Java" named "ij147-jdk6-64bit-setup.exe" and install it. I agreed with all defaults but didn't grant firewall access. I don't see why it should need to access the network.

If you try to open a .mrc file with ImageJ you'll get the following error: Plugin or class not found: "Open_MRC_Leginon". The ImageJ wiki explains that .mrc is not natively supported by ImageJ and directs you to their plugins page which doesn't explicitly mention .mrc but from the "Bio-Formats" hint on the wiki you might eventually discover the LOCI Bio-Formats library which leads to the actual Bio-Formats ImageJ Plugin.

and put it in C:\Program Files\ImageJ\plugins\jars\ and restart ImageJ. It is now able to display .mrc files.

Convert to MRC

The above lets you view MRC, but it won't let you save as MRC. To do that you should use IMOD.

The University of Colorado explains how to install cygwin which is required for IMOD. Download and run their cygwin installer which will display a help file telling you what options to click in the installer.

Next, download and install IMOD for windows which will add IMOD to the cygwin setup. After this you can click the "cygwin terminal" icon on your desktop and issue commands like TIF2MRC

Example Usage

$ tif2mrc c:/temp/a3d/* c:/temp/Jellyfish.mrc                                   cygwin warning:
  MS-DOS style path detected: c:/temp/a3d/
  Preferred POSIX equivalent is: /cygdrive/c/temp/a3d/
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
Opening c:/temp/a3d/Cropped_slice_00000_z=0.1005um.tif for input
Opening c:/temp/a3d/Cropped_slice_00001_z=0.1561um.tif for input
Opening c:/temp/a3d/Cropped_slice_00002_z=0.1682um.tif for input
Opening c:/temp/a3d/Cropped_slice_00003_z=0.1796um.tif for input
Opening c:/temp/a3d/Cropped_slice_00004_z=0.1931um.tif for input
Opening c:/temp/a3d/Cropped_slice_00005_z=0.2075um.tif for input
Opening c:/temp/a3d/Cropped_slice_00006_z=0.2222um.tif for input
Opening c:/temp/a3d/Cropped_slice_00007_z=0.2353um.tif for input
Opening c:/temp/a3d/Cropped_slice_00008_z=0.2475um.tif for input
Opening c:/temp/a3d/Cropped_slice_00009_z=0.2628um.tif for input
Opening c:/temp/a3d/Cropped_slice_00010_z=0.2779um.tif for input
Opening c:/temp/a3d/Cropped_slice_00011_z=0.2945um.tif for input
Opening c:/temp/a3d/Cropped_slice_00012_z=0.3121um.tif for input
Opening c:/temp/a3d/Cropped_slice_00013_z=0.3260um.tif for input
Opening c:/temp/a3d/Cropped_slice_00014_z=0.3363um.tif for input
Opening c:/temp/a3d/Cropped_slice_00015_z=0.3489um.tif for input
Opening c:/temp/a3d/Cropped_slice_00016_z=0.3641um.tif for input
Opening c:/temp/a3d/Cropped_slice_00017_z=0.3771um.tif for input
Opening c:/temp/a3d/Cropped_slice_00018_z=0.3916um.tif for input
Opening c:/temp/a3d/Cropped_slice_00019_z=0.4029um.tif for input
Opening c:/temp/a3d/Cropped_slice_00020_z=0.4214um.tif for input
Opening c:/temp/a3d/Cropped_slice_00021_z=0.4363um.tif for input
Opening c:/temp/a3d/Cropped_slice_00022_z=0.4514um.tif for input
Opening c:/temp/a3d/Cropped_slice_00023_z=0.4712um.tif for input
Opening c:/temp/a3d/Cropped_slice_00024_z=0.4861um.tif for input
Opening c:/temp/a3d/Cropped_slice_00025_z=0.5023um.tif for input
Opening c:/temp/a3d/Cropped_slice_00026_z=0.5172um.tif for input
Opening c:/temp/a3d/Cropped_slice_00027_z=0.5322um.tif for input
Min = 0, Max = 252, Mean = 168.097
{ "loggedin": false, "owner": false, "avatar": "", "render": "nothing", "trackingID": "UA-36983794-1", "description": "", "page": { "blogIds": [ 489 ] }, "domain": "holtstrom.com", "base": "\/michael", "url": "https:\/\/holtstrom.com\/michael\/", "frameworkFiles": "https:\/\/holtstrom.com\/michael\/_framework\/_files.4\/", "commonFiles": "https:\/\/holtstrom.com\/michael\/_common\/_files.3\/", "mediaFiles": "https:\/\/holtstrom.com\/michael\/media\/_files.3\/", "tmdbUrl": "http:\/\/www.themoviedb.org\/", "tmdbPoster": "http:\/\/image.tmdb.org\/t\/p\/w342" }