Converting to JPEG would work, of course. If you do link in libraries that can render DICOM, you can add direct support to NSImage. You do this by implementing a subclass of NSImageRep, DICOMImageRep. The minimal implementation of an NSImageRep subclass is just the method -draw, which should draw into the rectangle {{0,0},[self size]}. If you want methods like -[NSImage initWithData:] and -[NSImage initByReferencingURL:] to work, you should also implement +imageRepsWithData:, +canInitWithData:, and +imageUnfilteredFileTypes. Basically, look at the NSImageRep class docs. They describe which methods are useful to override.
Implementing an NSImageRep subclass is pretty similar to implementing a custom view. -Ken On Tue, Aug 12, 2008 at 11:28 PM, Martin Carlberg <[EMAIL PROTECTED]> wrote: > Try this: http://www.osirix-viewer.com/ > > 13 aug 2008 kl. 08.12 skrev Devraj Mukherjee: > >> Hi all, >> >> My application requires to display DICOM image files. Preview doesn't >> support DICOM by nature so the thought at the moment is to use >> something like ImageMagick and convert these images to something JPEG >> on the fly? >> >> NSImage doesn't seem to be able to take a DICOM stream. Is this the >> best of doing this? Does anyone know of a Cocoa DICOM reader library? >> >> Thanks a lot. >> >> -- >> "I never look back darling, it distracts from the now", Edna Mode (The >> Incredibles) >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) >> >> Please do not post admin requests or moderator comments to the list. >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/cocoa-dev/martin%40oops.se >> >> This email sent to [EMAIL PROTECTED] > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com > > This email sent to [EMAIL PROTECTED] > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]