diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 1a4feec..8606975 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,6 +4,8 @@ Changelog
 Version 3.2.0
 -------------
 
+- ``neurom.features.neurite.principal_direction_extents`` directions correspond to extents
+  ordered in a descending order.
 - Add features ``neurom.features.morphology.(aspect_ration, circularity, shape_factor)```
 - Fix ``neurom.morphmath.principal_direction_extent`` to calculate correctly the pca extent.
 - Fix ``neurom.features.neurite.segment_taper_rates`` to return signed taper rates.
diff --git a/neurom/features/neurite.py b/neurom/features/neurite.py
index 0439d88..6aac5e9 100644
--- a/neurom/features/neurite.py
+++ b/neurom/features/neurite.py
@@ -446,7 +446,12 @@ def section_end_distances(neurite):
 
 @feature(shape=(...,))
 def principal_direction_extents(neurite, direction=0):
-    """Principal direction extent of neurites in morphologies."""
+    """Principal direction extent of neurites in morphologies.
+
+    Note:
+        Principal direction extents are always sorted in descending order. Therefore,
+        by default the maximal principal direction extent is returned.
+    """
     return [morphmath.principal_direction_extent(neurite.points[:, COLS.XYZ])[direction]]
 
 
diff --git a/neurom/morphmath.py b/neurom/morphmath.py
index 248c2e9..45f0700 100644
--- a/neurom/morphmath.py
+++ b/neurom/morphmath.py
@@ -479,7 +479,7 @@ def principal_direction_extent(points):
         extents : the extents for each of the eigenvectors of the cov matrix
 
     Note:
-        Direction extents are not ordered from largest to smallest.
+        Direction extents are ordered from largest to smallest.
     """
     # pca can be biased by duplicate points
     points = np.unique(points, axis=0)
@@ -488,13 +488,17 @@ def principal_direction_extent(points):
     points -= np.mean(points, axis=0)
 
     # principal components
-    _, eigv = pca(points)
+    _, eigenvectors = pca(points)
 
     # for each eigenvector calculate the scalar projection of the points on it (n_points, n_eigv)
-    scalar_projections = points.dot(eigv)
+    scalar_projections = points.dot(eigenvectors)
 
-    # and return the range of the projections (abs(max - min)) along each column (eigenvector)
-    return np.ptp(scalar_projections, axis=0)
+    # range of the projections (abs(max - min)) along each column (eigenvector)
+    extents = np.ptp(scalar_projections, axis=0)
+
+    descending_order = np.argsort(extents)[::-1]
+
+    return extents[descending_order]
 
 
 def convex_hull(points):

diff --git a/tests/features/test_get_features.py b/tests/features/test_get_features.py
index 6b480c8..20372b9 100644
--- a/tests/features/test_get_features.py
+++ b/tests/features/test_get_features.py
@@ -798,18 +798,46 @@ def test_principal_direction_extents():
 
     # test with a realistic morphology
     m = nm.load_morphology(DATA_PATH / 'h5/v1' / 'bio_neuron-000.h5')
-    p_ref = [
-        1210.569727,
-        38.493958,
-        147.098687,
-        288.226628,
-        330.166506,
-        152.396521,
-        293.913857
-    ]
-    p = features.get('principal_direction_extents', m)
-    assert_allclose(p, p_ref, rtol=1e-6)
 
+    assert_allclose(
+        features.get('principal_direction_extents', m, direction=0),
+        [
+            1210.569727,
+            117.988454,
+            147.098687,
+            288.226628,
+            330.166506,
+            152.396521,
+            293.913857,
+        ],
+        atol=1e-6
+    )
+    assert_allclose(
+        features.get('principal_direction_extents', m, direction=1),
+        [
+            851.730088,
+            99.108911,
+            116.949436,
+            157.171734,
+            137.328019,
+            20.66982,
+            67.157249,
+        ],
+        atol=1e-6
+    )
+    assert_allclose(
+        features.get('principal_direction_extents', m, direction=2),
+        [
+            282.961199,
+            38.493958,
+            40.715183,
+            94.061625,
+            51.120255,
+            10.793167,
+            62.808188
+        ],
+        atol=1e-6
+    )
 
 def test_total_width():
 
diff --git a/tests/test_morphmath.py b/tests/test_morphmath.py
index 181aaf8..43bb4dc 100644
--- a/tests/test_morphmath.py
+++ b/tests/test_morphmath.py
@@ -587,8 +587,8 @@ def test_principal_direction_extent():
     ])
 
     npt.assert_allclose(
-        sorted(mm.principal_direction_extent(cross_3D_points)),
-        [6.0, 10.0, 12.0], atol=0.1,
+        mm.principal_direction_extent(cross_3D_points),
+        [12.0, 10.0, 6.0], atol=0.1,
     )
 
 

Maximal direction extent
@lidakanari , asked for a maximal direction extent feature in https://github.com/BlueBrain/NeuroM/pull/1008#issuecomment-1073704148

There are two ways to achieve this:

1. Add a new feature that will return the maximum of the principal direction extents.
2. Order the existing principal_direction_extent feature from max to min. The max extent would then be equal to `principal_direction_extent(direction=0)`

@arnaudon , @adrien-berchet, @mgeplf 
tests/features/test_get_features.py::test_principal_direction_extents tests/test_morphmath.py::test_principal_direction_extent
tests/features/test_get_features.py::test_get_raises tests/features/test_get_features.py::test_register_existing_feature tests/features/test_get_features.py::test_number_of_sections tests/features/test_get_features.py::test_max_radial_distance tests/features/test_get_features.py::test_section_tortuosity tests/features/test_get_features.py::test_number_of_segments tests/features/test_get_features.py::test_number_of_neurites tests/features/test_get_features.py::test_number_of_bifurcations tests/features/test_get_features.py::test_number_of_forking_points tests/features/test_get_features.py::test_number_of_leaves tests/features/test_get_features.py::test_trunk_angles tests/features/test_get_features.py::test_neurite_lengths tests/features/test_get_features.py::test_segment_radii tests/features/test_get_features.py::test_segment_meander_angles tests/features/test_get_features.py::test_morphology_volume_density tests/features/test_get_features.py::test_section_lengths tests/features/test_get_features.py::test_section_path_distances tests/features/test_get_features.py::test_segment_lengths tests/features/test_get_features.py::test_local_bifurcation_angles tests/features/test_get_features.py::test_remote_bifurcation_angles tests/features/test_get_features.py::test_segment_radial_distances_origin tests/features/test_get_features.py::test_section_radial_distances_endpoint tests/features/test_get_features.py::test_section_radial_distances_origin tests/features/test_get_features.py::test_number_of_sections_per_neurite tests/features/test_get_features.py::test_trunk_origin_radii tests/features/test_get_features.py::test_trunk_section_lengths tests/features/test_get_features.py::test_soma_radius tests/features/test_get_features.py::test_soma_surface_area tests/features/test_get_features.py::test_sholl_frequency tests/features/test_get_features.py::test_bifurcation_partitions tests/features/test_get_features.py::test_partition_asymmetry tests/features/test_get_features.py::test_partition_asymmetry_length tests/features/test_get_features.py::test_section_strahler_orders tests/features/test_get_features.py::test_section_bif_radial_distances tests/features/test_get_features.py::test_section_term_radial_distances tests/features/test_get_features.py::test_total_width tests/features/test_get_features.py::test_total_height tests/features/test_get_features.py::test_total_depth tests/features/test_get_features.py::test_aspect_ratio tests/features/test_get_features.py::test_circularity tests/features/test_get_features.py::test_shape_factor tests/test_morphmath.py::test_vector tests/test_morphmath.py::test_linear_interpolate tests/test_morphmath.py::test_interpolate_radius_r1_g_r2 tests/test_morphmath.py::test_interpolate_radius_r2_g_r1 tests/test_morphmath.py::test_interpolate_radius_extreme_cases tests/test_morphmath.py::test_path_fraction_point_two_points tests/test_morphmath.py::test_path_fraction_three_symmetric_points tests/test_morphmath.py::test_path_fraction_many_points tests/test_morphmath.py::test_scalar_projection tests/test_morphmath.py::test_scalar_projection_collinear tests/test_morphmath.py::test_scalar_projection_perpendicular tests/test_morphmath.py::test_vector_projection tests/test_morphmath.py::test_vector_projection_collinear tests/test_morphmath.py::test_vector_projection_perpendicular tests/test_morphmath.py::test_dist_point_line tests/test_morphmath.py::test_point_dist2 tests/test_morphmath.py::test_segment_length2 tests/test_morphmath.py::test_point_dist tests/test_morphmath.py::test_angle_3points_half_pi tests/test_morphmath.py::test_angle_3points_quarter_pi tests/test_morphmath.py::test_angle_3points_three_quarter_pi tests/test_morphmath.py::test_angle_3points_equal_points_returns_zero tests/test_morphmath.py::test_angle_3points_opposing_returns_pi tests/test_morphmath.py::test_angle_3points_collinear_returns_zero tests/test_morphmath.py::test_angle_between_vectors tests/test_morphmath.py::test_polygon_diameter tests/test_morphmath.py::test_average_points_dist tests/test_morphmath.py::test_path_distance tests/test_morphmath.py::test_segment_area tests/test_morphmath.py::test_segment_volume tests/test_morphmath.py::test_segment_length tests/test_morphmath.py::test_segment_radius tests/test_morphmath.py::test_segment_x_coordinate tests/test_morphmath.py::test_segment_y_coordinate tests/test_morphmath.py::test_segment_z_coordinate tests/test_morphmath.py::test_segment_radial_dist tests/test_morphmath.py::test_taper_rate tests/test_morphmath.py::test_segment_taper_rate tests/test_morphmath.py::test_pca tests/test_morphmath.py::test_sphere_area tests/test_morphmath.py::test_interval_lengths tests/test_morphmath.py::test_spherical_coordinates tests/test_morphmath.py::test_convex_hull_invalid tests/test_morphmath.py::test_aspect_ratio tests/test_morphmath.py::test_circularity tests/test_morphmath.py::test_shape_factor