The document discusses the Virtual Research Environment for Cancer Imaging (VRE-CI) project which aims to provide a framework for researchers and clinicians to share cancer imaging information, images, and algorithms. It describes using Business Connectivity Services and managed metadata to organize and search image metadata, and building a reusable SharePoint site definition to manage DICOM files and extract metadata for search. Key aspects covered include mapping folders, issues with document library names, including external code, and adapting the DICOM field model.
28. Visual Studio 2010 BCS Solution to Access Remote Image Metadata User Case: Unix file storing system in ROB Large volume of files Raw data containing no or less meaningful metadata Using a specific folder structure to indicate the image metadata e.g. Technology, Image Acquisition Machine, Group Head, Users. Allow SSH to the file server
29. Folder Structure Example tomography Systems Inveon MRI47 Data Data RM1 RM1 SF1 SF1 RM1_SF1_SF36_420 RM1_SF1_SF36_420 20100223_static_VCAM_tumour_M1_5hpi 20100223180102_01
31. Solution Shell script to populate the image metadata XML Use SSH to transfer the image metadata XML to the SharePoint Server Apply Business Data Connectivity Services to connect SharePoint to the external image metadata XML Navigating and searching the image metadata within SharePoint
38. Aims A reusable site definition for SharePoint to manage cancer related DICOM files. Make visible the metadata from inside the DICOM files within SharePoint. Especially within Search. Enable areas of the DICOM files to be marked for subsequent analysis. To link with Trident for subsequent analysis
39. Visual Studio 2010 The definition is built using Visual Studio XML, C#, SharePoint APIs, Silverlight APIs
41. Site provisioning SharePoint ‘provisions’ a new site from a site definition. This requires the site definition to have to perform various actions – in the right order: Global onet.xmlThis file defines list templates for hidden lists, list base types, a default definition configuration, and modules that apply globally to the deployment. SPSite scoped features defined in site definitions onet.xml, in the order they are defined in the file.The onet.xml file defined in the site definition can define navigational areas, list templates, document templates, configurations, modules, components, and server e-mail footers used in the site definition to which it corresponds. SPSite scoped stapled features, in quasi random order SPWeb scoped features defined in onet.xml, in the order they are defined in the file. SPWeb scoped stapled features, in quasi random order List instances defined in onet.xml Modules defined in onet.xml [Source: Site Configurator v2: User Guide for Developers] This is frustratingly easy to get wrong!
42. Site Configurator To help build the definition we used the SharePoint Site Configurator Feature http://spsiteconfigurator.codeplex.com/ (January 2011) This enabled simpler ‘provisioning’
44. Issues with document library names Site Configurator does not deal correctly with spaces in document library names for provisioning. Best to avoid spaces. Thicket folders: folders ending in ‘_Files’ and a host of other similar names are hidden/renamed by SharePoint. See KB905231. This ‘feature’ directly interacts with the DeepZoom technology, which uses ‘_files’ as a suffix for a directory.
45. Including external unmanaged code Technically tricky: avoid if at all possible Map C:rogram Filesommon Filesicrosoft Sharedeb Server Extensions4IN and place unmanaged DLLs in it. Use managed code to call the unmanaged code. E.g. [DllImport("DICOM.dll")]
46. DICOM types DICOM has approximately 3500 field types – identified by their Tag name which has the form (Group, Element). We adapted the IETF RFC4122 name-based GUID algorithm (section 4.3 of http://www.ietf.org/rfc/rfc4122.txt) to map these onto SharePoint Field definitions with name based GUIDs, and generated corresponding fields within the site definition. An example generated field is: There can be issues when re-loading fields into SharePoint. It worked first time isn’t good enough! We found that the above form worked the second time as well. The key extra attribute is ‘DisplaceOnUpgrade’.
47. Things we would do differently Use the Silverlight client object model Prefer ‘Plain Old Document Libraries’ over Document Sets until they are more mature Separate the DICOM field definitions from the site definition during development (they take an age to load on a development VM) Consider recoding some of the ‘Untrusted code’ as trusted code.
Notas del editor
//Based on the algorithm from section 4.3 of http://www.ietf.org/rfc/rfc4122.txt public static Guid NameBasedGuid(string Group, string Element) { byte[] inputBytes = new byte[4];inputBytes[0] = Byte.Parse(Group.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);inputBytes[1] = Byte.Parse(Group.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);inputBytes[2] = Byte.Parse(Element.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);inputBytes[3] = Byte.Parse(Element.Substring(2, 2), System.Globalization.NumberStyles.HexNumber); //Get an array of the input in byte form //byte[] inputBytes = Encoding.Default.GetBytes(input); //Prepare an array for the input bytes and the Namespace Guid byte[] concatenatedBytes = new byte[16 + inputBytes.Length]; //Copy the namespace id guid and the input sequence to a second array { //GuidNameSpaceID = new Guid("596bdb90-e5ad-4952-a904-dc47da78d260"); byte[] NamespaceIDBytes = new byte[] { 0x90,0xDB,0x6B,0x59,0xAD,0xE5,0x52,0x49,0xA9,0x04,0xDC,0x47,0xDA,0x78,0xD2,0x60 }; //GuidNameSpaceID = new Guid(NamespaceIDBytes);Array.Copy(NamespaceIDBytes, concatenatedBytes, 16);Array.Copy(inputBytes, 0, concatenatedBytes, 16, inputBytes.Length); } //Calculate the SHA1 hash of the second array - this gives us 20 bytes of which we use the first 16. SHA1CryptoServiceProvider SHAProvider = new SHA1CryptoServiceProvider(); byte[] hashBytes = SHAProvider.ComputeHash(concatenatedBytes); //Construct the guid byte[] GuidData = new byte[16]; //Copy across the first 16 bytes of the hashArray.Copy(hashBytes, GuidData, 16); //Special treatment is required for bytes 7 and 8 //In byte 7 the 4 most significant bits of the time_hi_and_version field need to be set to 1010 (small endian) //This is to set it to version 5 of the UUID as outlined in section 4.1.3. Note they are using big endian for their numbers. byte LowerMask_7 = 15; // 00001111 byte UpperBits_7 = 160; // 10100000 GuidData[7] &= LowerMask_7;GuidData[7] |= UpperBits_7; //Byte 8 has to have the two most significant bits (bits 6 and 7) of the //clock_seq_hi_and_reserved to zero and one, respectively. byte LowerMask_8 = 63; // 00111111 byte UpperBits_8 = 128; // 10000000 GuidData[8] &= LowerMask_8;GuidData[8] |= UpperBits_8;GuidhashGuid = new Guid(GuidData); return hashGuid; }