 So in the next session we will show some tools that can be used to actually register images to the 2D and 3D printer classes. I just want to start with a little disclaimer and overview on image registration. So what we will show here are two ways of interactively doing image registration, so aligning one image with another. And this is only like a small part of the different ways and cases that image registration can be done. So just to quickly summarize, in general kind of image registration you might have in a very simple case one image of a section of a brain and another one maybe of the next consecutive section the same brain or something other. And if you just take it like say on a microscope it may simply be at a different position. So in image registration what you usually want to do you just want to bring them to the same coordinate system so that if you combine them that it doesn't look like this, but they come nicely to an alignment. And there are many different cases of this problem. The first we will have a look at is actually in a rodent brain the case that you have a 2D image and you want to position it in a 3D space so that you want to actually anchor it to the atlas. That means you have a 3D volume here and you have this image and you basically want to find the position where it fits. And in a rodent brain you can in first instance do it quite well by moving, rotating and shearing this image a little. If you go to the human brain and for example you take two image sections from two different human brains you usually end up with the problem that the folding pattern is a completely different one. So you cannot solve this problem just by moving, rotating and scaling the image a little bit. You would have to do massive deformations. So the problem is a different one, a little different one so you would need more tools. Then you might have the case that you don't have a 2D image but you have a 3D image. And that is a very irregular case in neuroimaging. So you have a 3D image of a whole brain and you have another brain maybe from the atlas and you want to match them to each other. In that case you usually apply automatic tools. So there are automatic tool chains available that will warp a whole brain to a whole brain. Then there is this case that you want to go from 3D to 3D but you have only a part of a brain in your image of interest. So maybe from an astrological experiment a piece of a hippocampus and you want to place that in the correct position in the big brain that we've just seen. This is very difficult to do automatically because it would be very difficult for algorithm to actually find the landmarks or the constraints how that is being done. And we will later on show you a tool where you can try to do this automatically. So there are different ways of doing it. And then at the very end you might want to warp a human brain correctly to another human brain where you really apply very complicated deformations. This is something we won't cover it today and this is something you cannot do interactively. It's because it's a highly complex problem and we will not cover it in this session. So what we will show in this session is how can you interactively position a 2D section in a 3D atlas volume and a partial volume in a 3D atlas volume. And I will start with the first case. Yes. So my name is Maia Pichaudes and I will tell you a little bit about quick knee which is our tool to anchor two serial 2D sections from rat brains or mouse brains into the respective reference atlases. And I wanted to show you this slide. It's like illustrating why is it a good idea to integrate different kind of data in the same atlas. Here are examples where we integrated both axonal tracing data, in situ aberration data and some neuronal reconstructions in the Allen mouse brain atlas. So you can see that the axonal tracing was extracted from the slides and visualized in green. Then you have the position of the in situ cells which are parvalbumin-labeled cells represented by those red dots. And then you have actually the position of that reconstructed neuron as a tiny, tiny point here in the middle. Illustrating then a new way to visualize different kind of data in the same framework. The same speak to the rat images. Here we combined electrode positions. By having serial sections we were able to reconstruct the entry point of those electrodes plotting one dot per slice. So we will get a trace of position of where the electrodes were put inside the brain. We could combine electron microscopy data and also immunohistochemistry data from that part of the brain. And then electron microscopy was located in the hippocampus. Of course we don't go to the granularity down to electron microscopy data but if we know that this data represents a small point it will be represented by a point. If we don't know exactly where, for example in C1, this was taken but we still can have an idea that is located somewhere in the C1. So we have different level of granularity here by representing the data in the atlas and depending on how much information we get from each data set we can place it in the brain very precisely or more closely. And we think that is great to be able to either compare big cohorts of data between similar animals or compare different modalities of data. So in the practical session we are going to work with quick knee. So I hope everyone has managed to install the software and got a copy of some of the Allen Institute images we provide to you. So if you want to use them please remember to cite the Allen Institute properly and otherwise they are freely available online. So you start typically with a serial 2D image series. You need some pre-processing meaning that for the tool to work optimally you have to place your section in the serial order being that you name your sections like 2, 4, 6, 8 if you have to take every two sections. The orientation is important so especially if you work with corona sections not to mix left and right amy spheres so you are sure that you put them in the right orientation. And then in this pre-processing step you generate a coordinate file. It's in XML format and we will do that exercise so you will see how from images in a folder you can generate XML file that you use to start working with quick knee. They are restriction because quick knee as the name says is supposed to work quite quick and that's why we are working on low resolution images and for now they should be in certain formats. But that's quite easy to generate. So what you do is match and position one section at a time in the reference atlas but because they are all cut at the same angles you can do that in several sections and reiterate the anchoring. And once you've done that for subset of the image there is an algorithm that will propagate those angle and position to the neighboring sections so this will increase the procedure so it's manually in the beginning but then you use calculation from the algorithm online I mean it's live and then what you have to do is validate the results maybe do small adjustments and when you are finished you will be able to export custom atlas plates so the idea here is that we don't distort the image but we distort the atlas to fit the image so the image data is intact but the atlas is deformed so linearly with rotations and alignments to fit the image and what you get as an output is both an atlas planche corresponding to your data and also a coordinate file that you can further use to do all the kind of analysis. So the user interface is looking like that when you open for the first slides you see your image in the foreground and the atlas in the background then you can use this bar on the left side to toggle between the image and the atlas and you will have to obtain that result over there where you have tilted the atlas in the dorsal ventral position in order to match the cutting plane of the section you also adjust the medialateral angle the same way to adjust for any deviation there and schematically it's illustrated here that when you begin all the sections are in a default zero position and align but then you will start adjusting one section and they all move the same way so it allows you to work a little bit faster and at the end you will get a positioning of your section image in any atlas viewer you wish or that is compatible with that, yes? Is scaling to fit the CCF space part of that pre-processing or would you do it to make sure? No, the scaling you do it here as well. So usually what we do is that it's important to start working with images where you have very reliable and good landmarks because obviously if you start in a striatum where you don't have so many landmarks and basically even if you are at another bregma you could shrink the section to fit but you will not be at the right position, right? So this posterior position of your section in the brain is quite important and usually we use specific landmarks to make sure that we are where we are and that's why it's beneficial to have this automatic calculation because in some brain regions you have almost no landmarks or if you have very little labeling or if you don't see the white matters so well it's very difficult to know if I'm here or I'm one or two millimeters behind it does the calculation for you based on the prerequisite that you have ordered your section according to their spacing but you will have this practical session where you can try it yourself and you will get a feeling of it and here is just an example of different angles so here in that corona section you see that some landmarks here seems to fit but here doesn't and if you tilt the atlas eight degrees then more or less everything comes in place in that use case it's a rat section that was cut at 45 degrees and here also if you have the atlas as your degree nothing is in place but you are able to tilt the atlas exactly the way the section was cut and also an illustration of a horizontal section where you can tilt the atlas eight degrees to exactly match and with this tool you can use all the three cutting planes chronological and horizontal sections so we're gonna dig into the exercise right away you had memory sticks with images they should be in the session 3 and called quick knee roll there are 11 images of colonel mouse brain section labels will can build in by in situ aberration and I would like you to create your XML file with a file builder so we're gonna do that and then we're gonna start the quick knee software and begin with the registration and yeah I realized I have handouts mine are I forgot to take them out can you take them in my bag? yeah in the blue it's because it's easier to have quick knee in the screen and to read the paper that's why I printed what we like to do is also to work with dual screens makes things a little bit easier but you can be done on one screen so if you open the quick knee folder you will find the file builder script you double click on it and then you have a Windows 10 computer so you have to unblock it's looking like this and then you have a folder with all the images you select them I open a much longer list but you only have 10 images they are in the quick knee roll session 3 and then you save XML you give it a name and what is important is to save that XML in the same folder as the small images Yuba, could you pass me the USB sticks? the USB stick? yeah the remark when I open the images in the quick knee builder and we get these remarks it's because there is an image size limit so it's yellow it's still acceptable but if the image is too big it will not take it so there are restrictions but they will work still but it's just telling you the image should not exceed this and is this where if I need it to edit a number or something I could? yes you can you have a function that says rename rename if sometimes it's because what it does it's looking for serial numbers and if it doesn't recognize it you can click rename and you can there we go so I just had to run it from the same folder yeah also the XML file needs to be saved along with the images next to be in the same folder is it alright for the rest of you? you got it? so you save it you can rename it with your name here session 3 quick knee roll so once you saved it you can close that and then you open the quick knee EXE and then here you have the main window where you have the version 3 the common coordinate framework version 3 you can toggle between the probabilistic MRI which is based on 1675 mice so it's quite nice giving you an idea of how it should look like but you also can go and have a look at the NISL atlas then we have the original passillation or maps from ALM and the rainbow one is the one we made ourselves based on that it's just that we changed a little bit the colors, tones here so you will be able to see the cortical layers but it's exactly the same than the original from you guys it's just that here when you go from layer 6 to 5 to 4 to 3 it's the same color but in the rainbow we have put different colors so it's a little bit able to see and so here you cannot zoom in because this tool is based on quite low resolution images but it allows you to place your image in the right place then if you go to the manage data click there and this windows appears and then you click on load then you have to find the folder where you made your xml file here here here and then you find your xml file and click ok then it should look like this are you finished already? good do you need someone to help or are you there? and you also? ready? getting there so I only put 10 or 11 images here because we don't have many hours but it's to give you an overview you double click on one of those images in that window I choose this one in the middle it will get you there so here so maybe did you have the xml in the same folder as the images? you need to have your saved xml file in the same folder as those small images that's why it must be in the same folder where all the images are you're running on mac I'm sorry we have you downloaded the mac version I did cool and if you double click on one of them could you not see the mac version and test the memory stick just that I have the images let me see I can copy I can copy just a second what do you see? I think it's a bit possible your reservation but I need the Atlas scale right? so everything is plain in the paper but I will come and show you so if you are on the probabilistic MRI you can see it in the background and then you see your image in the foreground and then you can toggle with them within them so the easiest is to use a mouse but you have these arrows here click on it and then you have to press shift or space you place this marker there then you put your mouse arrow away from it and then you can drag left clicking then you press this one and this is how you adjust the size of the Atlas by using those two arrows there so you can do that to get approximately where it should be if you left click just here you can move it so it's a good idea to find the midline and then you'll have to find the right brightness level because here obviously in the Atlas you are in the stratum but you can see in your image here you have hippocampus so you can either go to that sagittal view and click on this arrow or you can left click on the small red dot and drag it where you want so the idea is to begin with to try to find the right level right so here I'm more or less at the right and what I'm looking at obviously it's a good idea to use the data address as a landmark right to see where you are and then to use white matter and it's shape to see if it's fits and when you think you are approximately in the right position you can click store and the red question mark will turn green then you can start working with angles angles you change by those arrows here so usually we work in this sagittal window when you were working with coronal sections because then you adjust the also ventral angle so you can click back and forth trying to find and to find the also ventral angle you use features that are landmarks that are different between the dorsal part and the ventral part of the brain when you go to the atlas rainbow or original modality you can see the name of the atlas region so the first thing we try to find is the dorsal ventral angle you are right position we down to your commission I can't really tell if you go back and forth oops maybe you use that mouse you have a mouse mouse in the hotel room yeah it's a good okay for today so you can store then you can try to figure out if this dorsal ventral angle should be zero or it should be but it's gonna be difficult to do on that slide so what you need to find is a slide where you have maybe usually to find the dorsal ventral angle is a good idea to find a section that has some pontine nucleus on it but before adjusting too much the angles a good idea is to anchor a second slide for those that have done the first one I think it's easier with this one but I would then maybe position myself a little bit so if you go to another slide find a position find a position it comes together definitely you can also change the slide so the section brings it and you can make these arrows but scaling is not like this yeah so now you changed the section that you work with so what's to be done here is Kudai Pinchemen this is Telamos we are much too far it's somewhere here I think so so when you have done that exercise with two sections the positions are automatically calculated for the rest of them so they will be roughly at the right position so you have to review all the sections and adjust you can also adjust if they were a little bit tilted you can adjust their position within the plane to match the section and the goal is that they all are green so you have to review each section and make sure they all fit and once you've done that you have to save the XML here save a new XML then you can give it another name and that new XML will contain the coordinates of your series that you can use in the pipeline in the next step that my colleague Sharon is going to demonstrate for you in session 4 so that's a little teaser so if you want to work with quick knee on your data please contact us send an email to HPP support and we'll be happy to help you anchoring your data or if you have any other question related to that tool we you can find the tool on nitric.org as well and there we have a forum so you can also ask questions there and our developer Gergé who made the tool will also answer you if you have more technical questions or if you want to use the tool in another way or something like this so times fly when we have fun and I think I have to let you play around with volumetric data now and I'm available if you have questions or if things are not clear now