please summrize this parts for method section in article and rewrite it to improve and add some refrences:Sure, here is the entire text combined into one section:

This study utilized Magnetic Resonance Imaging (MRI) due to its excellent contrast in soft tissue imaging. The Freesurfer software was used for volumetric measurements. The work was divided into four stages: diagnosis, imaging, image processing, and final processing.

The study was conducted at the Tehran University of Medical Sciences MS Research Center. All selected individuals were informed about the test procedure and entered the test with personal consent.

Imaging was performed using a 3T Prisma scanner, which is a magnetic resonance imaging system with 64 receiver channels. High-resolution T1W and T2W anatomical images were obtained.

Image processing includes lesion segmentation, lesion filling, and final processing. The "LST: Lesion Segmentation Tool" toolbox is used for lesion segmentation. The first algorithm, a lesion growth algorithm (LGA), requires both a FLAIR image and a T1 image. The second algorithm is a lesion prediction algorithm (LPA) that only requires a FLAIR image. In this project, the first algorithm is used. Lesions are segmented by the LGA algorithm as described in the LST toolbox for SPM. Lesion filling can be applied to any image that is aligned with the lesion probability map.

Each T1-weighted MRI image was processed using FreeSurfer 6.0 recon-all. This method first performs motion correction, corrects intensity non-uniformity, and performs intensity normalization. It then segments different brain tissues and creates a cortical surface mesh for each T1. A spherical version of the cortex is registered in a common surface space. Finally, it uses an anatomical atlas (this atlas must also be a new version of the surface atlas and be registered in the common surface space) to assign a neuroanatomical label to each native brain voxel. In this project, the cortical parcellation proposed by Schefer was used. This parcellation divides the cortex into 7 functional networks with 10 different levels of spatial clustering (from 100 to 1000 clusters). For completeness of the atlases, subcortical regions were added using the FIRST command provided by FSL software (Patenaude 2007). An example of a whole-brain structural connectome organized into hemispheres and resting-state networks (RSNs) along with a table containing information about different regions of each functional network is shown in the figure and table below.

MRtrix is a software package for analyzing diffusion data. One of the notable advantages of MRtrix over tensor fitting techniques is their method for constrained spherical deconvolution (CSD). This method converts the diffusion signal in each voxel into a set of overlapping fiber bundles. This reduces the problem of fiber crossings that can cause confusion when examining tensors. The software also has wrappers for commonly used FSL commands: in particular, topup and eddy commands.

Preprocessing steps include:
- Preprocessing
- Denoising
- Unringing
- Motion and distortion correction
- Bias field correction
- Brain mask estimation
- Constrained Spherical Deconvolution
- Response function estimation
- Estimation of Fiber Orientation Distributions (FOD)
- Intensity Normalization
- Connectome Creation
- Preparing Anatomically Constrained Tractography (ACT)
- Preparing a mask for streamline termination
- Preparing a mask for streamline seeding
- Creating streamlines
- Reducing the number of streamlines
- Region-of-interest filtering of tractograms
- Connectome construction
- Preparing an atlas for structural connectivity analysis
- Matrix generation

NBS-Predict requires the following input data to perform ML analysis on individual connectivity matrices, spreadsheet with brain network regions, design matrix, and contrast vector.
- Connectivity Matrices

Similar to NBS, users must provide symmetric N×N connectivity matrices as a feature set (one matrix per subject), where N is the total number of nodes (e.g., brain regions). In fully connected symmetric connectivity matrices (i.e., all possible node pairs are connected), the total number of edges between nodes is (N ×(N-1))/2. The number of edges is determined by the clustering atlas used to define brain regions. For example, as the Schefer atlas used in our project consists of 200 brain regions.

Since NBS-Predict extends above-threshold edge selection with simple GLM-based feature selection and graph-theoretic connected components concept, it requires a traditional design matrix. NBS-Predict requires a similar structure for the design matrix as required by GLMs in NBS. With the design matrix for analysis, users pre-specify the nature of the prediction problem (classification versus regression), target variable, and nuisance variables that should be removed along with contrast vector. For regression, the first column in the design matrix should be an intercept term (i.e., column of ones), while the second column should contain the target variable for prediction which in this analysis project is being sick. For classification problems, these first two columns should contain one-hot encoded data labels (e.g., 0 for control group and 1 for contrast group). Additional columns should represent nuisance variables. In this program, we consider age and gender which are common nuisance variables that need to be controlled in neuroimaging studies. Examples of design matrices for regression and classification problems are shown below.

In this project, NBS-Predict is run twice using two sets of contrast vectors to select edges with higher mean values in healthy individuals than in MS patients while controlling for gender and age. Thresholding the weighted network allows for direct interpretation of results and provides information about the contribution of edges to the overall model. A cross-validation structure is used to classify individual brain networks. Edge weights in original observed graphs are features presented to ML algorithms. Joining two components together may improve the prediction performance of ML algorithms. Selected edges in extracted components are updated with their corresponding weight and all weights are averaged and normalized. Then it is possible to plot selected edges that had the most contribution to prediction.