Comparison of an oblique single cut rotation osteotomy with a novel 3D computer-assisted oblique double cut alignment approach

An oblique double-cut rotation osteotomy (ODCRO) enables correcting a complex bone deformation by aligning, in 3D, the distal, middle and proximal bone segments with a target bone, without intersegmental gaps. We propose virtual preoperative planning of an ODCRO. To minimize a residual translation error, we use an optimization algorithm and optimize towards bone length, alignment in the transverse direction, or a balanced reconstruction. We compare the residual alignment error with an oblique single-cut rotation osteotomy using 15 complex bone deformations. The single-cut approach was not feasible in 5 cases, whereas the ODCRO procedure was feasible in all cases. The residual alignment error was smaller for the ODCRO than for the single-cut approach except for one case. In a subset for length reconstruction, the length error of 7.3–21.3 mm was restored to 0.0 mm in 4 of 5 cases, although at the cost of an increased transverse translation. The proposed method renders planning an ODCRO feasible and helps restoring bone alignment and lengthening better than an oblique single-cut rotation osteotomy. Awareness of the challenges and possibilities in preoperative planning of an ODCRO will be of value for future alignment surgery and for patients.

www.nature.com/scientificreports/ not a trivial task because several degrees of freedom have to be optimized for spatial adjustment of bone fragments, osteotomy locations and orientations, while taking into account biomechanical and medical constraints 8 . In this paper we propose an iterative method for optimal planning of an oblique double-cut rotation osteotomy, in which the intermediate bone segment is used as autologous bone graft. We evaluate alignment by simulation and compare it with the achievements of an oblique single cut rotation osteotomy.

Materials and methods
An ODCRO basically consists of two oblique rotation osteotomies. Figure 1a shows part of a deformed radial bone and defines a distal and proximal cutting plane. Repositioning of the distal bone segment is achieved by first rotating the distal bone over an angle β d about axis h d , which is perpendicular to the distal cutting plane (Fig. 1b). Next, the distal bone segment and the wedge are considered a single unit, which is rotated over an angle β p about the second axis h p perpendicular to the proximal cutting plane to achieve rotational alignment (Fig. 1c). The first challenge in performing an ODCRO is to choose a set of osteotomy parameters, i.e., cutting planes and bone rotations, that restore rotational alignment of the distal bone segment. We will show that this is possible by calculating parameters for one oblique osteotomy (obliquity, bone rotation) once the parameters for the other osteotomy are chosen. However, the aforementioned approach does not take into account the inherent but undesired translation of the distal and middle bone segments (Fig. 1d). The optimal set of osteotomy parameters therefore not only restores rotational alignment but also minimizes residual translations of the bone segments. This optimal set of osteotomy parameters can be found by a user in a manual approach by interactively choosing a first osteotomy plane (location and obliquity) and bone rotation, while an algorithm calculates the same osteotomy parameters for the other plane. If translational alignment is unsatisfactory, the user can manually adapt the first osteotomy parameters and the location of the other osteotomy and let the algorithm calculate its obliquity and the corresponding bone rotation. An alternative to this trial and error approach is using an automatic optimization algorithm to find the optimal osteotomy parameters for both planes. In this paper we describe the theory behind calculating the osteotomy parameters of one plane when the other osteotomy parameters are chosen by the user. We further propose using an optimization algorithm to improve translational alignment of all three bone segments with a target bone.
Planning of an ODCRO. Performing an ODCRO requires position planning of the distal bone segment with respect to the proximal bone segment. The mirrored contralateral bone serves as planning target (reference) in this study. As a pre-processing step we proximally align the affected and target bones to visualize where the affected bone starts deviating, but also to visually and quantitatively evaluate the result of performing an ODCRO. Since a statistically significant relation was found between rotational malalignment and patient satisfaction 9 after surgery, our aim was to perfectly plan rotational alignment and to minimize residual transla- The distal segment is rotated over β d about the axis (h d ) oriented in the direction of the cutting plane normal (n d ) and a point on the axis (p d ), being the centroid of the polygon points in the cutting plane. A second axis (h p ) is defined in the same way using the proximal cutting plane (cutting plane normal n p , point on the axis p p ). The rotated distal segment and the middle segment are considered a single assembly which is rotated about the axis over the angle β p . The exploded view shows applicable parameters. (c) Aligned bone segments after rotation. (d) In general, a residual translation error may persist (arrow) between the corrected bone and the target bone (green), although rotational alignment is achieved. This translation error depends on the chosen osteotomy parameters, such as the osteotomy plane locations. www.nature.com/scientificreports/ tional malalignment. Below we describe the theory behind preoperative position planning, restoring rotational alignment in the application of an ODCRO, and optimizing translational alignment in this approach.
Preoperative position planning. In this paper we adopt a method for position planning as described before 10,11 . In short, the affected bone is segmented and distal and proximal segments are clipped for subsequent registration to the mirror image of the contralateral healthy bone. The segments were clipped in order to exclude the deformity since this would deteriorate registration to the target image. Registration yields two 4 × 4 matrices for transforming the distal (Md) and proximal segment (Mp) to the contralateral bone (Fig. 1a). The correction matrix (Mc), which transforms the distal segment from the affected to the planned position in the coordinate system of the preoperative image ( Fig. 2) containing the affected bone, can now be calculated: Restoring rotational alignment 'manually'. The standard way to describe bone repositioning in 3-D space is by placing it at the center of an orthogonal coordinate system, rotating it about its axes, and translating it to the desired location. An alternative way to describe this object transformation is by using a helical axis (Fig. 2c) 5 . This axis is positioned in 3-D space such, that the transformation is achieved by rotating the object over an angle, β, about the helical axis and translating the object along the helical axis over a distance d. The rotational part of this method is used in an oblique single-cut rotation osteotomy (OSCRO) [4][5][6] , where the cutting plane is chosen perpendicular to the helical axis, and rotating the distal bone segment over the angle β yields rotational alignment. The parameter d is set to 0, which keeps the bone faces connected but introduces a translation error. An ODCRO basically consists of two OSCRO's in which specific rotation axes and rotation angles are chosen. For planning of an ODCRO, we first focus on restoring rotational alignment using two oblique rotation osteotomies and ignore possible bone translations that we may introduce with the procedure. Repositioning of the distal bone segment in Fig. 1a is achieved by rotating the distal bone over an angle β 1 about axis h d (h d :x = p d + λ 1 n d ) defined by the distal cutting plane normal (n d ) and a point (p d ) on that axis. Since we wish to keep the bone faces connected in a double-cut osteotomy, we choose to position the axis through the centroid of the distal cross section (p d ). Next, the distal-middle bone assembly is rotated over an angle β p about the second axis h p (h p :x = p p + λ 2 n p ) defined by the proximal cutting plane normal (n p ) and a point (p p ) on that axis. The centroid of the proximal cross section (p p ) is again used to define the position of the axis. In this procedure we basically performed two axis rotations β d and β p , which jointly restore rotational alignment of the distal bone segment. If we define the distal axis rotation by R d (p d , n d , β d ) (see appendix) and the proximal axis rotation by R p (p p , n p , β p ), the following expression needs to be solved to achieve rotational alignment: The orientation of the proximal cutting plane n p and the rotation angle β p are finally calculated by 5 : with r ij the matrix element of R p at row i and column j. In the above description we chose parameters for the distal plane (p d , n d , β d ) to define R d and calculate R p . Note that the same reasoning is valid for calculating R d and the parameters of the distal plane if we wish to choose the parameters of the proximal plane (p p , n p , β p ) to define R p . For reasons of simplicity we assume in this paper that the distal plane parameters are set by the user interactively (or automatically by the optimization algorithm) and the proximal plane parameters are calculated by the algorithm as visualized in Figs. 3 and 4. In practice the user may choose to position one plane to not interfere with soft tissue structures and subsequently check if the other plane is feasible as well at the same time judging whether the residual translational error (see Fig. 1d) is acceptable. This trial-and-error method is cumbersome, hence the approach with automatic translation optimization.  www.nature.com/scientificreports/ ODCRO with automatic translation optimization. The approach in the previous section restores rotational alignment but does not take into account the translation that the bone segments undergo when they are rotated about the rotation axes ( Fig. 1d). Choosing different plane locations, orientations and bone rotations may result in smaller translation errors. To find an optimal set of parameters (p d , n d , β d , p p , n p , β p ) ( Fig. 1b) we have implemented a modified downhill simplex optimizer by Nelder and Mead 13 and iteratively compare bone segment repositioning after virtual application of an ODCRO with the target bone. To reduce the chance of ending up in a suboptimal minimum, the modified algorithm alternates between standard simplex optimization 13 and random tries bounded by the search space. In our optimization approach we adopt in-plane translation of the bone segments as well (x d , y d ) and (x p , y p ), in an attempt to further improve positioning. The user initializes the procedure by setting distal and proximal plane constraints (Figs. 4,5). The optimization algorithm is allowed to search for an optimal set of osteotomy parameters within this region. Other constraints and optimization choices, which will be discussed below and are listed in Table 1 and Fig. 4, are set by the user through a dialog window ( Fig. 6) just before the optimization procedure starts. Optimization parameters (Table 1). Given the fact that p d , n d , p p and n p are 3 × 1 column vectors, the total number of optimization parameters (p d , n d , β d , x d , y d , p p , n p , β p , x p , y p ) would be 18. However, this can be reduced to a nine-parameter search space of independent parameters using the following reduction strategy. Since n p and β p can be calculated once a distal plane is chosen (see Eqs. 3 and 4), they do not need to be included as optimization parameters. This saves four optimization parameters. The location of the osteotomy planes (p d , p p ) can be expressed by distances measured along a line, which saves another four optimization parameters. To this end we calculate and use the gravitation axis of the target bone (Fig. 5a). This axis is determined by calculating the inertia tensor from the polygon mesh points of the target bone. This tensor enables calculating the three Distal plane location Azimuth (φ d ) and elevation (ψ d ) angles: Azimuth (φ d ) and elevation (ψ d ) angles (n p , see Eq. 4): Rotation of distal/middle bone assembly β p (#) See Eq. (3) In-plane sideward and upward translation of distal bone segment ($) In-plane sideward and upward translation of distal/middle bone assembly ($) x p , y p x p , y p Figure 6. (a) User interface to control performing an oblique double-cut rotation osteotomy manually, or, (b) to set the optimization parameters for the automatic procedure. www.nature.com/scientificreports/ eigenvectors and eigenvalues. The unit vector k (Fig. 5a) with the smallest eigenvalue identifies the direction of the gravitation axis. The centroid of the target bone (c) completes the vector representation of the gravitation axis (g:x = c + λ k). The distal and proximal osteotomy planes intersect the gravitation axis at p d and p p . We use the intersection point (p 0 ) of the gravitation axis and the proximal plane constraint (Fig. 5) as reference in calculating the plane positions, defined by d 1 , the distance between p d and p 0 , and d 2 the distance between p d and p p . Finally, the orientation of the distal osteotomy plane can be expressed in terms of azimuth (φ) and elevation (ψ) angles, which saves another optimization parameter.
Constraints. Besides the aforementioned distal and proximal plane constraints, the algorithm takes into account the minimum amount of bone overlap (δ d , δ p ), the maximum allowed plane angulation (ρ p , ρ d ) and the maximum amount of tissue torsion (μ d , μ p ). These constraints and the involved parameters are described in Table 2 and affect the metric (detailed below) which gives guidance to the optimizer. The optimizer tries to find a set of osteotomy parameters which leads to a small residual translation of the bone segments, i.e. a low value of the metric. Optimizer attempts which go beyond the set constraints should therefore largely increase the metric, hereby driving the optimization algorithm toward a better solution.
The metric. The metric (ε) that guides the optimization procedure is defined as follows: Here a (range [0, 1]) is set by the user and balances between optimizing the length error e l and the transverse error e t of all bone segments. Parameter θ adds a high penalty to the metric if any of the constraints (Table 2) is exceeded, which effectively invalidates the current optimizer attempt. Vector e (Fig. 5c) represents the residual translation of the distal bone segment. It runs from the centroid of the distal bone in the target position to the centroid of that same bone segment in the achieved position. The unit vector k defines the direction of the gravitation axis of the target bone and points in the distal direction (Fig. 5a,c). The term |e ⋅ k| therefore is the residual length error, e l , and |e × k| is the transverse translation of the distal bone segment (Fig. 5c). To quantify the transverse alignment of the proximal and middle bone assembly, we cannot simply use their centroid positions, since alignment can still be compromised if the proximal bone segment bends away from the target bone, or the middle bone segment is tilted, as shown by Fig. 5c. Parameter e m is therefore assigned the average nearest neighbor distance between points of the middle and proximal bone segments, and points on the outer surface of the target bone. This value is 0 if the proximal and middle segments perfectly align with the target bone. Variable b (range [0, 1]) is also set by the user and balances between optimizing for transverse alignment of the distal segment (b = 0) or of the proximal and middle segments (b = 1).

Software implementation.
Custom software was written in the C + + programming language (Visual Studio 2013, Microsoft, Redmond, WA), for preoperative planning 10,11 and optimization of the parameters that control the oblique double-cut osteotomy procedure. The Visualization Toolkit 12 (VTK 7.1.0) was used for 3-D visualization and Qt 4.8.6 was used for GUI programming 14 (Nokia, Oslo, Norway).
Manual ODCRO'. After segmentation and position planning the user is enabled to position a proximal and distal plane to osteotomize the bone. The two plane orientations and the respective bone rotation angles are mutually linked by the rotation matrix R c (Eq. 2). One plane and bone rotation should therefore follow the other.

Constraint Metric parameter Penalty equation Description
Minimum bone overlap δ d , δ p (*) 10 100(A rel −Amin ) This penalty term increases exponentially once the overlap drops below a user-defined limit (A min ).With A rel the relative amount of bone overlap (range [0,1]) at the distal and proximal interfaces respectively The steepness α is calculated as the angle between the plane normals n d , n p and k representing the direction of the gravitation axis. Avoids steep osteotomies by increasing the metric exponentially when the steepness of either osteotomy plane exceeds α max as set by the user; Maximum tissue torsion μ p , μ d (*) 2 β−βmax + 2 −β−βmax Increases exponentially when the proposed bone rotation β = [β d , β p ] exceeds a predefined torsion limit β max as set by the user Plane position τ 100(n a + n b + n c ) Increases when either osteotomy plane passes beyond the plane constraints as set by the user. For this evaluation the cross section of the bone is first determined using the proximal and distal plane constraints. This provides two point sets p 1 and p 2 n a is assigned the number of points out of p 1 that are found distally from the distal plane constraint n b is assigned the number of points out of p 2 proximally from the proximal plane constraint n c contains the number of points in the volumetric overlap that remains after osteotomizing a distal and proximal bone segment using the two osteotomy planes. If the osteotomies do not intersect, n c equals 0 www.nature.com/scientificreports/ In the implementation of the software, the user is enabled to choose which plane and bone rotation angle should follow the other (Eqs. 2-4) (Fig. 6a, 'Sync planes' button). Subsequently executing the ODCRO causes the virtual bones to be cut at the specified locations followed by rotation of the respective bone segments. The result of this stitching procedure is visualized and represents the corrected bone.
ODCRO optimization. Alternatively, the user can choose to start the automatic optimization procedure to find a set of osteotomy parameters. This procedure is controlled by the metric defined by Eq. 5. The user can again choose which plane orientation should follow the other, as described above, and then start the optimization procedure. At this point a dialog is shown (Fig. 6b) in which the user can influence the optimization procedure by choosing values for the balancing parameters a and b (Eq. 5a,b), represented by the sliders in Fig. 6b. Several dimensions in the 9-parameter search space can be deactivated (Fig. 6b, e.g., fix the in-plane translation of the distal (x d , y d ) and/or proximal plane (x p , y p ), fix the distal plane orientation (φ d , ψ d ), translation (d 1 ) or distal segment rotation (β d )), which limits the search space. The amount of overlap (A min ), plane angulation (α max ) and tissue torsion (β max ) can finally be set to further tune the optimization procedure.
The optimizer stops iterating when a pragmatically set maximum number of iterations (1000), or metric tolerance (0.1 mm) is reached (Fig. 6b).

Experimental evaluation of the method.
All simulation experiments in this study are based on retrospective data containing 15 CT images of patients who were previously treated using conventional techniques in our academic hospital for a complex radius, tibia or femur deformity. All plans were implemented to evaluate our methodology but were not performed on these patients. These CT scans were acquired with standard patient protocols using a Brilliance 64-channel CT scanner (Philips Healthcare, Best, The Netherlands; isotropic voxel spacing 0.45 mm, 120 kV, 150 mAs, Pitch 0.6) and included the entire affected bone and healthy contralateral bone. All scans were anonymized. According to the Dutch Medical Research Involving Human Subjects Act, no approval of the medical ethics committee was required.
ODCRO vs OSCRO. One way to evaluate the alignment capabilities of our ODCRO method is to compare it with the achievements of a surgeon. However, since it is practically impossible to plan an ODCRO containing nine optimization parameters without computer assistance, the result would clearly be superior with the proposed technique. We therefore chose to compare the ODCRO method with the achievements of an OSCRO.
Lengthening. To investigate the ODCRO achievements in correcting for length, we select a subset of bones which required lengthening, and balanced, using parameter a ( Table 1) the optimization parameters to improve length as good as possible. In this procedure we relaxed the amount of bone contact (δ d , δ p ) ( Table 2).
Error quantification. Alignment of an affected bone, the bone after OSCRO and after ODCRO is quantified by averaging the error distances (d err ) of all the points in the corresponding polygon mesh to the nearest point in the polygon mesh of the target bone. This approach enables comparing the alignment of these three bone types quantitatively using a single parameter. When we aim to restore length as good as possible, we quantify the residual translation error (e in Eq. 5) in the length direction (d l =|e ⋅ k|) and in the transverse direction (d t =|e × k|).
Optimization time. An Asus Zenbook model UX331U (Asus, Taipei, Taiwan), with an Intel i7 -8550U processor, 16 GB of RAM and an NVIDIA GeForce MX150 GPU (2 GB RAM) was used to evaluate the execution time of each optimization session. The optimization code was written in a single thread. The visualization toolkit ran on multiple threats. Figure 7 shows the deformed bone specimens (orange) used in this study, proximally aligned with the target bone (green). Figure 8a shows attempts to reconstruct the deformed bones of Fig. 7 using an oblique single-cut rotation osteotomy 6 . The bones in the top row require a very steep osteotomy, which is not clinically feasible. The remaining cases perfectly restore rotational alignment of the distal articular surface at the cost of a residual translation error. In addition, the bones deviate from the target bone because of the deformation and sometimes show a large irregularity at the osteotomy location due to the required bone rotation in the OSCRO procedure.

Results
The oblique double-cut rotation osteotomy was performed by first manually choosing the location of the osteotomy planes, the orientation of one plane and the corresponding bone rotation, while the orientation of the other plane and the accompanying bone rotation followed automatically. This manual procedure was repeated until the ODCRO result was close to the target bone, hereby narrowing the search space. The subsequent optimization procedure balanced length and transverse alignment (a = b = 0.5), respected 50% of bone overlap (δ d , δ p ), and allowed a maximum plane angulation (α max ) of 80 degrees (parameters shown in Fig. 6b). The results of optimization are visualized in Fig. 8b.
Compared to the single-cut approach of Fig. 8a, the oblique double-cut rotation osteotomy can restore those cases that are not eligible for treatment by an OSCRO (Fig. 8a, top row). The remaining cases benefit from the ODCRO approach as well, since the corrected bone (white) is generally better aligned with the target bone. The median time it took to complete the optimization procedure was 182 s (IQR 106-198 s) for radiuses and 408 s for tibiae and femur (IQR 338-701s).
The alignment of the affected bone, the bone after OSCRO and after ODCRO, as quantified by average nearest neighbor distance, d err , normally decreases after an OSCRO and decreases further after an ODCRO, as shown www.nature.com/scientificreports/ by Fig. 9, indicating better overall alignment. Only for bone #13 the overall alignment did not improve for an OSCRO or ODCRO. However, the bone length was restored to almost normal after an ODCRO (Fig. 8b).
To further demonstrate the capabilities to correct for length, we selected bones (1, 3, 7, 14, 15) from Fig. 8b, because they required further lengthening, and balanced the optimization parameters to improve length as good as possible (a = [0.1-0.2]), at the cost of a deteriorated transverse alignment, while also relaxing the amount of bone contact (δ d = δ p = 0.2). Other optimization parameters were kept the same as above. Figure 10 visualizes the result, and quantifies the residual length error d l (Fig. 10a) and transverse error d t for the balanced approach (Fig. 10b) and after length optimization (Fig. 10c). It can clearly be seen that length is better restored at the cost of an increased transverse translation.

Discussion
In this paper we introduced a method for preoperative planning of an oblique double-cut rotation osteotomy. The method is fairly straightforward considering the reduction of angular deformities although it requires an iterative optimization procedure to minimize residual translation deformity as well.
The oblique double-cut osteotomy has been reported to treat severely deformed and shortened lower limbs combined with distraction osteogenesis for three to six weeks 15 . It has also been reported to correct a curvature www.nature.com/scientificreports/ deformation of the humerus by means of two closing wedge osteotomies, leading to severe bone loss 16 . The use of a double-cut osteotomy has further been reported for treating torsional alignment syndrome of the knee by performing a straight osteotomy at the distal femur and proximal tibia and restoring anatomical alignment 17 .
In these studies, in contrast to our method, no preoperative virtual 3D planning was used to keep the bone faces connected and to optimize for alignment. Instead, these procedures strongly rely on the surgeon's skill in appreciating the deformity and restoring alignment 6 . In the technique that we propose, alignment planning is performed in six degrees of freedom, hereby minimizing angular and translational deformity in the coronal, sagittal and axial plane in one procedure, without additional bone loss due to wedge removal as in the case of a closed wedge osteotomy. The method enables controlling alignment of the bone segments with a reference bone by balancing optimization for length or transverse alignment of the bone segments. This simulation study addressed the technique for preoperative planning. Transferring the plan to the actual patient's bone, however, can be considered an additional challenge in which three bone segments have to be positioned in 3-D space. Different techniques have been described in the last decades, for navigating bone segments to the planned position. These techniques are either based on tool tracking 18,19 or use patient specific instruments, such as cutting and/or drilling guides that fit the patient's bone [20][21][22][23][24] , and reduction guides that bring the bone segments in the planned position 22 . Recent literature further reports on techniques that use www.nature.com/scientificreports/ patient-specific osteosynthesis material that force bone segments in the planned position while at the same time providing bone fixation 25 . A limitation of optimization techniques is the fact that a suboptimal solution may be found at a local minimum 13 , especially in a multi-dimensional search space. We do not consider this a major limitation of our approach since solutions close to the global minimum may as well be acceptable for clinical reasons. The algorithm further enables us to manually choose osteotomy parameters and to quickly evaluate the result, before starting the automatic procedure. Fixing some parameters in the optimization procedure further helps narrowing the search space. In this study we did not perform a sensitivity analysis for the nine optimization parameters and for the balancing parameters a and b, which may be considered a limitation. We recommend performing a sensitivity analysis in future implementations of our approach. A disadvantage of the method is that it is relatively slow to find an optimal solution. Partly because of the manual initialization, and partly due to the time it takes for the algorithm to complete the optimization. However, for practical reasons we evaluated the method and its execution speed of the ODCRO procedure on a mobile ultrabook. There are several ways to speed up the procedure, such as using a high-end workstation or reduction of the polygon meshes representing the bones. In our approach the user controls optimizing for length and transverse displacement using balancing parameters a and b. For future implementations it may be of interest to investigate using a multi-objective approach 24 in which the user may select two objectives, e.g., optimizing for length and transverse displacement. After optimization the user could make a selection out of a set of pareto-optimal solutions. www.nature.com/scientificreports/ In this study we used typical examples of seriously deformed bones to demonstrate the methodology from a technical, and not from a clinical point of view. In actual patient cases a surgeon may choose to only allow cutting a bone in a specific region for clinical reasons. Or to limit the osteotomy plane angle or bone rotation. These constraints are supported by the proposed method although they may compromise the resulting plan. The method should be considered a tool that helps in planning the complex ODCRO approach, while the surgeon still needs to judge whether the proposed result is clinically feasible. In one of our previous studies the ODCRO procedure already showed to be clinically feasible for clavicular reconstruction 26 . www.nature.com/scientificreports/

Conclusion
Choosing adequate osteotomy parameters in the application of an ODCRO is extremely difficult without computer assistance. The proposed method restores rotational alignment and optimizes translational alignment using an iterative procedure. The proposed ODCRO procedure has shown to be effective for different bone types where the single-cut approach fails. It further yields a better alignment of bone segments with a target bone, which renders the method of interest for future corrective surgery.

Appendix, rotation about an arbitrary line
The rotation matrix that rotates an object over an angle β d about an arbitrary line (or helical axis) through the origin in 3-D space, is found 27 by rotating space about the z-axis to bring the line into the xz-plane. Next, space is rotated about the y-axis until the line is along the z-axis. In this state the object can simply be rotated about the line, i.e. the z-axis, using a straightforward rotation matrix R z (β). To bring the rotated object to the original line position in 3-D space, it is rotated back about the y-axis and z-axis. These consecutive steps are combined in a single rotation matrix R d (p d , n d , β d ): with: p d = (p x , p y , p z ), a point on line l. n d = (n x , n y , n z ), unit direction vector of line l. β d = angle of rotation about line l With α being φ z or β. In case the arbitrary line l:x = p d + λ n d does not go through the origin, which is normally the case in a rotation osteotomy, space can first be translated using translation matrix T(-p d ) before applying rotation matrix R d . Finally space is translated back to the original location using T(p d ).