|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On 4/6/09 4:59 PM, hui Zhang said: >I have been working on creating a quicklook plugin for the most popular 3-D >medical image format, known as the NIfTI-1 format. Well, one option is to use our free plugin, which supports NIfTI-1 as well as most other medical image formats. :) <http://www.rogue-research.com/downloads.html> > <key>UTExportedTypeDeclarations</key> > <array> > <dict> > <key>UTTypeConformsTo</key> > <array> > <string>public.data</string> > <string>public.image</string> > <string>public.radiance</string> > </array> > <key>UTTypeDescription</key> > <string>NIfTI-1 Volume</string> > <key>UTTypeIconFile</key> > <string></string> > <key>UTTypeIdentifier</key> > <string>gov.nih.nifti-1</string> > <key>UTTypeTagSpecification</key> > <dict> > <key>com.apple.ostype</key> > <array> > <string>data</string> > </array> > <key>public.filename-extension</key> > <array> > <string>hdr</string> > <string>nii</string> > <string>nii.gz</string> > </array> > </dict> > </dict> > </array> Please don't use that declaration! It is important that all Mac applications use the same UTIs for the same file formats. For many common formats like jpeg, gif, etc. Apple provides UTIs ensuring that we all use the same thing. However, they did not provide one for NIfTI (<rdar://545345>). Many months ago, I contacted all the authors of all the Mac medical imaging software (that I knew of), and we agreed on UTIs for medical image formats. I've attached them, please use them. Perhaps you could also contact me off list and let me know of any Mac medical imaging software you know about, I may have missed some. Please feel free to share the attached file with them. >1) Is it at all possible to get the launch service to understand the "nii" >format without going through an actual application? Yes, declaring it in your plugin is sufficient. But you should be using UTImportedTypeDeclarations. >2) I'd like to associate the plugin with the "hdr" suffix as well. But the >system binds this type of suffix to radiance file with UTI of >public.radiance. File extensions suck. Additionally, Launch Services (LS) has no facility to deal with conflicting extensions. Please file a bug. >Setting the HFS type is not an option, since most of these >files are created on systems other than Mac. It won't help either, because LS prefers extensions over HFS types, even if two UTIs are fighting for the same extension. <rdar://5997350> Please file a dupe to raise the priority. >As a hack, I tried to include >the Radiance type as a conforming UTI. (see the Info.plist segment above) It >is not working. Maybe I am not doing it correctly. Is this a possible hack >if done right? Don't do that. It just makes your UTI declaration wrong. NIfTI files do not conform to Radiance. That's nonsense. >Any other alternative strategies? I haven't tried yet, but one hack would be for your plugin to claim it can preview public.radiance in addition to gov.nih.nifti-1. Of course, this means that your plugin will try to preview real Radiance files, which won't work. If your users have both Radiance and NIfTI files they will be greatly annoyed I imagine. >3) Is there anyway to handle complex suffix like "nii.gz"? Not that I know of. I believe an extension can have only one period. Back to radar. :) -- ____________________________________________________________ Sean McBride, B. Eng email@hidden Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quicklook-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
|>UTI questions (From: hui Zhang <email@hidden>)|
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.