1 / 37

Ccseg tutorial

Ccseg tutorial. Overview. Introduction Input data Graphical User Interface Example with GUI Command line execution Output files. Welcome to the Corpus Callosum segmentation tutorial.

max
Download Presentation

Ccseg tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ccseg tutorial

  2. Overview • Introduction • Input data • Graphical User Interface • Example with GUI • Command line execution • Output files

  3. Welcome to the Corpus Callosum segmentation tutorial. CCseg is an open-source software that allows a semi- automatic segmentation of the corpus callosum and provides volume information. Introduction

  4. Input Data

  5. You can use the option in command line “gui” to use the graphical user interface. For example : ./Ccseg –gui Graphical User Interface (GUI)‏

  6. There are three main tabs : 1) Input Data: it includes four fields needed to set the input data and the name of the project if one wants to create one. By default, it will be set to the name of the input image. 2) Initialization : it includes all initialization parameters needed for the computation. For example, one can flip/reverse axes. Use only before run/continue/compute probability maps. 3) Computation : it contains parameters needed for the segmentation. One can change them between two loops to improve the segmentation. Graphical User Interface : Parameters Tab

  7. You should change this parameters only at the beginning . - Vessel Removal remove vessels as the initial step. Removes high intensity Vessel based on EMS segmentation (for IR-prepped SPGR only). Off by default. - Opening applies an open operation instead of closing in preprocessing of segfile. Off by default. - Linear interpolation is used during the preprocessing to change the interpolation of the filter when you increase the size of the image by two. Off by default. - Unconstrained to add an unconstrained segmentation step at the end of the process. Off by default. - Segmentation label changes the white matter label in the segmentation file by “0” instead of “1”. Off by default. - Fix Similarity form reset the center/rotation/scale during the segmentation. off by default. - Debug : displays additional information for a debugging mode (advanced user). Off by default. Graphical User Interface : Initialization

  8. Graphical User Interface : Initialization • Permutation of axe X/Y : rotates the 2D image with 90 degrees with permutation of the axis. Off by default. • Flip X or Y : reflects the 2D image at X/Y axis. Off by default. • Increase the size by two of the image and the model for more precision. On by default. • Use the other component in mask only in the case when the brain-stem is larger than the corpus collosum.They call the initialization when you change it.

  9. Graphical User Interface : Initialization • PSDistance : is the profile sampling distance. 0.5 by default • Slice direction (0 for x, 1 for y, 2 for z) : direction corresponding to the sagittal plane. 0 by default • Midsagital Plane Slice : number of slices in the “slice direction” to find the midsagittal one. The middle by default • Average number : number of slices used when averaging around the midsagittal slice. If 0, no averaging is done. 2 by default • Number of points for drawing: number of points used to display the contour of the corpus callosum. Default/max: 256. Default button will reset all of the parameters for the computation.

  10. In the tab menu initialization, you can play with the contour by rotating it of 90/180/270 degrees. Graphical User Interface : Initialization

  11. Parameters used to improve the overall segmentation. - MPSDisplacement : Max displacement allowed per step by pixel. It has to be between 0 and 10. Three values, one per step. 10,3,2 by default. - Number of loop : number of iteration for each step. 50,5,3 by default - White mater intensity : white matter intensity delimited the corpus callosum border. Three values, one per step, by default, the preprocessing computes the default value. - Lambda max : factor allowing deformations within PCA shape space. 100 by default. Graphical User Interface : Computation

  12. Manually traced points can repulse the segmentation following this repulsive function : Y=f(dist)=A*exp(-r*dist) Amplitude “A” is by default 100*goodness of fit mean. This value appears in the box GOFmean (slide 14). Radius “r” of the repulsion area. by default 0.1. Each update of these parameters will appear directly on the repulsive zone Clear repulsive points is a button to reset the points (slide 17 to know how to put a repulsive point). Graphical User Interface : Parameters for Run

  13. The image defines the Update mode. If your segmentation is off compared to the corpus callosum, it can be manually updated : you can make a translation of the X/Y Center, a rotation or a scale. Click Update to see the amelioration on the image. Graphical User Interface : Parameters for Run

  14. When you load the input data, the input image and the model appear near the isoline. Isoline has an impact on the zone of repulsion and help you to deal with GOFmean (Goodness of Fit). In the menu “File”, you can set a new window, save the output image, save/load the parameters. Graphical User Interface : Output Image view

  15. Rotation for visualization : allows the user to rotate the input image for a better visualization. Four values are available : 0/90/180/270 degrees. For this image, you can use an 180 degrees rotation. The result will be : Graphical User Interface : Output Image view

  16. BOX : The five Box on the image displays information about : - the area of the segmentation - the goodness of fit mean - Pixel intensity pointed by the left mouse click. - “instructions” which gives the convergence of the steps. - “Init Parameters Values” which gives the values of the Center X/Y, Scale, Rotation and white matter from the preprocessing. Graphical User Interface : Output Image view

  17. Three mouse effects are available on the input image : - click on the left-button of the mouse gives the value of the pixel that you point. - click on the right-button puts a repulsive button at this place. - scroll the middle button to zoom in/out. Graphical User Interface : Mouse effect on the image

  18. Five action buttons could be used. - calculate the initialization and set the input image with the preview segmentation. - Run/Continue compute the CC segmentation using the initialization when you use it the first time and the output of “Run” as initialization if you click on it again. - Compute Probability Model to compute all of the statistics. - help gives informations about parameters. - Quit to leave the software Graphical User Interface : Action Buttons

  19. Here is an example of using this software. You load all of the inputs data and a preview segmentation on the input image appears. Example with GUI

  20. The segmentation and the image have a different orientation and the largest component of the tissue segmentation isn't the corpus callosum. In the computation parameters tab, you can change the orientation by flip or permutation. In this case, you need an flip X and use the other component. Example with GUI : Change Initialization

  21. When the corpus collosum and the model fit together, you can click on the “Run/Continue” button and the software will calculate your segmentation and it will draw it for each step. Example with GUI : Run

  22. If the segmentation doesn't fit with the corpus callosum after a a first “Run/Continue”, you can use the same button again with repulsive point, Update mode or both. To use repulsive point, click with the left button of the mouse, on the image. Example with GUI : Continue

  23. The repulsive point's function is : Y = f(dist) =A * exp (- r*dist) where dist is the distance between repulsive point and the sum of segmentation point. If you use the repulsive point, you can play on the isoline to see the influence of the amplitude “A”. A is by default 100*GOFmean. This value appears in the box GOFmean. You can also update the value of “r” to change the impact on the segmentation. Example with GUI : Different interactions with repulsive point

  24. You can also play with the X/Y/Rotation/Scale value to improve the segmentation. Here, the scale and Y values have been changed. Example with GUI : Update action

  25. Results obtain with both methods with “continue”. Before After Example with GUI : Results with continue

  26. There is also the command Line to execute CCseg. You can ask the help ( --help) for more precision about the options. They are the same with or without GUI. For example : ./CCsegtool -I /biomed-resimg/Autism2/IBIS2/people/yben/5002-003-01_10_T1.hdr -M /biomed-resimg/Autism2/IBIS2/people/yben/5002-003-01_10_t2_fit_hard.hdr -C /tools/CCsegmenter_autism/Model/ -O /home/yben/test_output/5084/ -N test --sliceDir 0 --ReflectX –double Command Line execution

  27. The command Line needs the four input data like the GUI : Input image -I, eg : -I Image_T1.nrrd Tissue Segmentation image -M eg : -M Image_t2_nrrd Corpus Callosum atlas directory -A eg : -A /.../... Output Folder -O, eg : -O /...../.....If you used the flag “--gui”, you don't need to set the input data. Command Line execution : input data

  28. Command Line execution : Complementary flags • --N project : if you want to add a prefix befor all the outputs generated • -s (segLabel) can be added to change the white matter label in the segmentation file. • --sliceDir dir : if your slice direction is different that the default value (dir), add this flag to set the right direction. • --averageNum aNum : if you want a number of slices for averaging the gray values different that the default value(aNum), add this flag with the number of slices. • --Number_Pts : if you want to change the number of drawing points, add this flag with the right number. 256 is the maximum and the default value.

  29. Command Line execution : Complementary flags • --VesselRemoveOn : add this flag to remove vessels as initial step. • --permute_x_y : add this flag to permute X and Y axis. • --reflectXOn / --relfectYOn : add this flag to reflect at y/x-axis (flip horizontal/vertical)‏ • --openOn : add this flag to do an open operation instead of closing in preprocessing of segfile. • --doubleOn : add this flag to increase the size by two of the image for more precision. • --Unconstrained : add this flag to add an unconstrained step.

  30. Command Line execution : Complementary flags • --WMintensity wm1,wm2,wm3 : if you don't want to use the preprocessing value of the white matter intensity. Give three value, one per step. When there is three values, you have the possibility to put one/two/three values. e.g : --WMintensity 100 or --WMintensity 100,80 or --WMintensity 100,80,80 • --FSXForm : add this flag to use fix similarity Xform • --PSDistance psd : if you want to change the profile sampling distance, use this flag. Have to be between 0.0001 and 1.0. • --MPSDisplacement mpsd1,mpsd2,mpsd3 : if you want to change the max per-step displacement, add this flag with one/two/three values for the three steps.

  31. Command Line execution : Complementary flags • -n i1,i2,i3 : add this flag to change the number of iteration by step. • --Lambdamax L : add this flag to change the factor for allowing deformations within PCA shape space. • --Coefofoptim c1,c2,c3 : if you want to optimise the process and use less time, add this flag. This coefficient per step will stop each step when the distance for a point between two iterations is less than this coefficient. • --MidPlaneSliceNumber mpsn : add this flag to change the number of the slice used for the segmentation in the SliceDir. • --Debug : add this flag to use the Debug mode

  32. Command Line execution : Complementary flags • --ComputeProbaModel : add this flag to compute soft subdivision areas of 2D curves given probability maps • --interpolationlinear : add this flag to use an linear interpolation when you double the size of the image in the preprocessing. • --loop loop : add this flag to continue the segmentation with the formers parameters. Loop is the number of continue you want to do. • --scalefactor scale : add this flag to multiply the scale during the preprocessing by this value. 1.35 by default.

  33. Command Line execution : Complementary flags • Addangle : add this flag to rotate the contour and fit with the input image corpus callosum • Othercompo : add this flag to use the other component during the preprocessing, if the brain-stem is larger than the corpus callosum

  34. Twelve files are created during the run/continue and six files with the compute probability model. CCseg saves nine images and nine text files. Output files

  35. Output files : Images • CCslice.png is the 2D image of the slice used by the software • Digicurve.nrrd is the 3D segmented image of the corpus callosum • finalImage.png is the 2D image representing the slice of the input image and the segmentation of the corpus callosum • InSlice.gipl and inMask.gipl are the 3D images of the Slice and the tissue segmentation level map. • probCurve1/2/3/4 are the probability map images for the four parts of the brain. For example the third part :

  36. Output files : Text files • 2D.pts is the 2D points from the segmentation (100 pts). • 3D.vtk is the 3D points from the segmentation in 3D world Space. It can be opened by Slicer. • area.txt and areaprob.txt are files with the value of the segmentation's area and the area of every probability map. • DP.pts represents the distance between a same segmentation point for two different iterations. • filecoef.coef gives the coefficient at the end of the segmentation. • goodnessoffit.gof or continuegoodnessoffit.gof regroups the values of the Goodness of fit for every point (100 values). • param.txt is the values of the parameters after the preprocessing.

  37. CCseg is an easy way to draw an segmentation of the corpus callosum and to calculate the probability about it. Thanks to this tutorial, you are now ready to use CCseg on your own dataset. Conclusion

More Related