Upgrading to DicomObjects v8

As a result of feedback from users, we've fixed a few bugs and improved resilience, but there are also a few breaking API changes in the 3D code:

  1. The data is loaded in the GPU when a DicomVolume is created.  This is great news for memory management, as only one copy is needed, however many 3D images are made from it, and however many viewers show them.  It ALSO means that the underlying DicomImage objects can be released once the volume has been created, freeing up main RAM.  There is a potential downside which could occur if the GPU "restarts" for any reason, and in the future we'll add an event which will fire in that scenario, to prompt you to reload/remake the 3D volumes.  A big beneficial side-effect of this change is that any exception which might be generated when making the 3D texture (e.g. is there is insufficient video RAM) will cause standard trappable exceptions from the main code, rather than during rendering.
     
  2. A few users asked for the ability to apply a slab-like thickness to MIP and to add Minimum IP.  After some debate and experiments, this has been done by replacing MIP mode by "Maximum" and "Slab" by average (as well as adding "Minimum").  All 3 modes now use the SlabThickness property if it is set to >0  (if <=0, then it is unused).  For Max/Min the SlabThickness defaults to 0 (unused) and for Average, it defaults to 5 (mm).
     
  3. All rendering now uses the same Direct3D "device".  This is what allows all the changes in (1) above, but it has also forced more rigorous locking and synchronisation of GPU operations, which might remove some random anomalous behaviour seen at times under unusual conditions.  Proper shutdown of that single device has proved challenging, so we'd like to hear of any issues regarding application shutdown.

The development of V7 (COM & .NET) has been an incremental process, with a large amount of useful input from our customers, for which we are very grateful.  As the process reaches its end (mid-Feb 2016) the number of people using the new versions will increase, so I've started this page as a place to document the changes from the point of view of a developer needing to upgrade from V6 to V7.  Of course, some of you will already be part of the way along the way, having used intermediate versions, but I hope that it is better to see a full list of changes, and to know which ones can be ignored, than to miss any out!

Internal Changes

By far the biggest changes in V7 are actually "behind the scenes", made with the intention of improving the resilience, efficiency and maintainability of DicomObjects, and they include:

  • Move to DirectX for the main means of rendering, with fallback to GDI+ for systems which cannot support DirectX.
  • Much closer alignment between the COM & .NET versions - both versions have benefited from the synergy during development, as much of the testing now applies to both!
  • Far greater normalisation of the code - thousands of lines of redundant code have been removed.
  • For 2D images, a 3x2 affine matrix is the primary means to support all display control, including that specified by presentation states etc. - unifying much of the display pipeline
  • A small change is almost exclusive use of DICOM keywords in place of group and element numbers, to improve code readability - we suggest that you do the same!
  • All internal Radians are now Degrees for consistency.
     

General API changes

  • Some of the less common Matrix methods and DisplayMatrix have been withdrawn to avoid confusion
  • Many methods which previously took a Matrix as a parameter now take a viewer or a Size instead to reduce ambiguity
  • Standardised Colour palettes have been provided - for .NET these are static properties of the DicomObjects.ColourPalettes class, but in COM they are accessed via DicoGlobal.Palette(name) where name is HotIron, HotMetalBlue, PetColor or Pet2oStep (or their DICOM "well-known" UIDs)
  • New('...') method in COM for instantiating new objects of the specified type has been discontinued, only the standard (language specific) way of creating objects is now supported.
  • Collection's AddNew() method (e.g. DicomLabels) has been discontinued as a step to remove duplicate functions. Instead, you can initialise and object and add it to its collections object.
  • UpdateFullScreen has now been merged into Refresh()

3D (both versions)

  • 3D images now have a single class, and hence it is possible to move between the types (MPR, Slab, MIP & VR) by changing the Mode property, without remaking the object.  In .NET this is the DicomImage3D class, and in COM it is simply a specialised DicomImage, but created via the DicomVolume.Make3D method.
  • One DicomVolume object can be used to make multiple 3D image objects - they share the same memory etc. and are therefore efficient, but have different views - using for 3 plane MPR etc.
  • The DX3DType is replaced by RenderMode3D, and the names have been changed to show the increased flexibility:
    • MIP is now "Maximum" (and Minimum is also available)
    • Slab is now Average
  • The DicomVolume constructor no longer takes a decimate parameter (as decimation is not needed/support in the 3D texture GPU mode)
  • SetViewPlane has been expanded to have 2 overrides - one is "simple" taking an enumerated plane, an option to recentre and a relative zoom (this is used for "resetting") to sagital etc. and a more detailed version which takes a centre point, a normal, an "up" vector and a relative zoom.  In both case, zoom is relative to the "auto-zoom" which is calculated to include the whole texture in the view area.

3D (.NETonly)

  • IDicomImage3D is not needed in its previous form, as the same DicoimImage3D is used for all the different 3D image types, but IProjection has been added to hold the transformation methods, which are shared with DicomImageFusion

3D (COM only)

  • The properties and methods specific to 3D which were formally members of the image's "View" property have been split into 2 groups:
    • Those related to the projection - zoom, angle etc. which are now part of the "Projection" property of the image
    • Those specifically related to 3D views (such as slab thickness) are now part of the PropertiesFor3D property of the image

Fusion (Both versions)

  • This is totally new to both versions - a fusion image (specific class in .NET - again simply a customised DicomImage in COM) In COM is created from the DicomImages.MakeFusion method.
  • This supports the Projection property (COM) or the IProjection interface (.NET) to allow spatial transformations, which are passed on simultaneously to ALL the images in the collection.  .NET has the OpacityValues, but for now, in COM, all images get equal opacity.

There are certainly changes which are missing from this simple list - if you find any, or have any suggestions/feedback/queries, please let me know: dave@medicalconnections.co.uk

 
Relevance: 

Comments

1

Always maintain the same quality in all the posts. This was really informative and I got lots of information from your post. Thank you for this post. The post is really amazing. It has many helpful information which is written in a simple and meaningful way. I have visited affordable custom essay writing service in the field.