feat: add TransformPointM2W
This commit is contained in:
@@ -494,6 +494,15 @@ void DICOMImageViewer::GetSlicePoint(double *point) {
|
|||||||
point[2] = focusPoint[2];
|
point[2] = focusPoint[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DICOMImageViewer::TransformPointM2W(double *point)
|
||||||
|
{
|
||||||
|
double focusPoint[4] = {point[0], point[1], point[2], 1.0};
|
||||||
|
ModelToWorldMatrix->MultiplyPoint(focusPoint, focusPoint);
|
||||||
|
point[0] = focusPoint[0];
|
||||||
|
point[1] = focusPoint[1];
|
||||||
|
point[2] = focusPoint[2];
|
||||||
|
}
|
||||||
|
|
||||||
void DICOMImageViewer::applySliceOffset(double offset, double direction){
|
void DICOMImageViewer::applySliceOffset(double offset, double direction){
|
||||||
double projV = Renderer->GetActiveCamera()->GetDirectionOfProjection()[SliceIJK];
|
double projV = Renderer->GetActiveCamera()->GetDirectionOfProjection()[SliceIJK];
|
||||||
double defaultProjV = defaultProjection[SliceIJK][SliceIJK];
|
double defaultProjV = defaultProjection[SliceIJK][SliceIJK];
|
||||||
|
|||||||
@@ -373,6 +373,8 @@ public:
|
|||||||
|
|
||||||
void GetSlicePoint(double *point);
|
void GetSlicePoint(double *point);
|
||||||
|
|
||||||
|
void TransformPointM2W(double *point);
|
||||||
|
|
||||||
void applySliceOffset(double offset, double direction);
|
void applySliceOffset(double offset, double direction);
|
||||||
|
|
||||||
virtual void UpdateReconPlane();
|
virtual void UpdateReconPlane();
|
||||||
|
|||||||
Reference in New Issue
Block a user