Making the Trachea Contiguous


Load the file

Under the view button select the Histogram/Sample panel. On the slice no. line start with slice one and view the slice. Increment through the whole data set viewing the trachea to see if the trachea is contiguous or jumps. Make a note where the trachea jumps between slices. (For example between slice 17 and 18 in this data set.)

Now activate the Load Image button. This will load the file into shared memory. For more explicit instructions, please see the Loading Image Data section.

Calculate the shift

Next, figure out the amount of the shift that occurred. Go back to the VIDA main panel and right click on the Analysis button and select the Region of interest button. On the Region of interest canvas use the + button to go to the slice before the shift. In the ROI: Region Properties panel select the poly item from the create window. Move back to the main canvas and trace the outer rim of the trachea. Move back to the ROI: Region Properties panel and selct the centroid item from the modify window. Move back to the main canvas and place the cursor inside the traced object and left click and the centroid should appear. Repeat the above on the next slice. Next, go to the ROI: Stats window and select stats for poly. In the statistics box select slice number and centroid. Now click on the Get Stats button and the slice number and the centroid values will appear in the text area. Copy this down to use in the next step. In this example the centroid for slice 17 is (80,130) and the centroid for slice 18 is (89, 127). So the x value needs to be shifted a positive nine pixels and the y value needs to be shifted a negative three pixels.

Split up the pre/post shift data

Next, go back to the VIDA main panel and select Load Analysis. Under the view button select the histogram/sample button. Draw a box around the trachea. The box needs to be big enough to include the trachea on all slices and preferrable a square. Also, the box dimensions need to be a multiple of eight in order for the interpolation program to work. Click on the set options button to save the box dimensions. To check the dimensions of the box by bringing up the LAF:Properties panel. Click on the Y button for the Slider Control buttons. Note the start value and the number value. The number value should be divisible by eight. The start value should be able to subtract the y value and still be positive. Now click on the X value. The number value should be the same as the number value for Y. If they are not but are close the user may retype in a new value for either.

The file needs to be divided into two files. The pre-shift file containing the slices before the shift. So for the example the pre-shift file will contain the first 17 slices. The post-shift file containing the slices after the shift.So for the example the post-shift file will start on slice 18 through slice 23.

To make the pre-sift file, go to the LAF:Properties panel and click on the Z button. Change the value on the number line to the number of slices present before the shift (for the given example the values should be changed to 17.) Now move back to the Load Analyze Format panel and select the load image button.

Now go back to the VIDA main panel and select Load Analysis and select the Memory Manager button. In this panel select the last file in the list which is the file that was just loaded. Next, select the save button to bring up the SHM: Save panel. Type in the directory and the a new filename and then click on the save button.

Next, make the post-shift file. Go to the LAF:Properties panel and click on the Z button. Change the value on the number line to the number of slices left after the shift (for the given example the values should be changed to 6. This is for slices 18 - 23.) Now select the Y button and change the start line value by the value calculate from the centroids from ROI. (For the given example the start line value of 10 will be changed to 7.) Also, click on the X button and change the start line value by the value calculate from the centroids from ROI. (For the given example the start line value of 11 will be changed to 20.) Next, click on the Z button. Change the value on the start line to the first slice that the shift occurred. (For the given example the new value will be 18.) Change the value on the number line to the number of slices present after the shift (for the given example the values should be changed to 6.) Now move back to the Load Analyze Format panel and select the load image button.

Now go back to the VIDA main panel and select Load Analysis and select the Memory Manager button. In this panel select the last file in the list which is the file that was just loaded. Next, select the save button to bring up the SHM: Save panel. Type in the directory and the a new filename and then click on the save button.

Make a new contiguous data file

Now go back to the VIDA main panel and press File Manipulation button and select Sequencer option. In Sequencer, select the input button. This brings up the SEQ: Input Volume Info panel. Type in the filename of the pre-shift file and the slice range (starting with slice one being called zero) and the phase range (assume the first phase is called zero) and then hit the save info button. Next, do the same for the post-shift file. Now, select the output button from the Sequencer main panel. This brings up the SEQ: Output Volume Info panel. Type in the directory to have the file written to, the new output file name, and the slice thickness and then hit the save info button. Next select the Sequence button. This causes the two input files to be written to the output file. Now the new output file created in Sequencer contains the set of contiguous slices.






DPI Homepage | VIDA Homepage | NLM Homepage | Contact Us | Search