Mercurial > hg > orthanc-stone
comparison Samples/Sdl/Loader.cpp @ 647:6af3099ed8da
uncoupling OrthancStone::SlicesSorter from OrthancStone::Slice
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 13 May 2019 17:03:46 +0200 |
parents | b4fe9642e83b |
children | 1088d4c4d78c |
comparison
equal
deleted
inserted
replaced
646:b4fe9642e83b | 647:6af3099ed8da |
---|---|
897 { | 897 { |
898 std::auto_ptr<Orthanc::IDynamicObject> object(queue_.Dequeue(100)); | 898 std::auto_ptr<Orthanc::IDynamicObject> object(queue_.Dequeue(100)); |
899 | 899 |
900 if (object.get() != NULL) | 900 if (object.get() != NULL) |
901 { | 901 { |
902 printf("===========================> REQUEST\n"); | |
903 | |
904 const Item& item = dynamic_cast<Item&>(*object); | 902 const Item& item = dynamic_cast<Item&>(*object); |
905 | 903 |
906 try | 904 try |
907 { | 905 { |
908 switch (item.GetCommand().GetType()) | 906 switch (item.GetCommand().GetType()) |
1372 if (frame != 0) | 1370 if (frame != 0) |
1373 { | 1371 { |
1374 tmp = GetFrameGeometry(frame); | 1372 tmp = GetFrameGeometry(frame); |
1375 } | 1373 } |
1376 | 1374 |
1377 bool opposite; // Ignored | 1375 double distance; |
1378 return (OrthancStone::GeometryToolbox::IsParallelOrOpposite( | 1376 |
1379 opposite, tmp.GetNormal(), plane.GetNormal()) && | 1377 return (OrthancStone::CoordinateSystem3D::GetDistance(distance, tmp, plan) && |
1380 OrthancStone::LinearAlgebra::IsNear( | 1378 OrthancStone::LinearAlgebra::IsNear(distance, thickness_ / 2.0)); |
1381 tmp.ProjectAlongNormal(tmp.GetOrigin()), | |
1382 tmp.ProjectAlongNormal(plane.GetOrigin()), | |
1383 thickness_ / 2.0)); | |
1384 } | 1379 } |
1385 | 1380 |
1386 bool IsColor() const | 1381 bool IsColor() const |
1387 { | 1382 { |
1388 return isColor_; | 1383 return isColor_; |
1495 { | 1490 { |
1496 Orthanc::DicomMap dicom; | 1491 Orthanc::DicomMap dicom; |
1497 dicom.FromDicomAsJson(value[instances[i]]); | 1492 dicom.FromDicomAsJson(value[instances[i]]); |
1498 | 1493 |
1499 DicomInstanceParameters instance(dicom); | 1494 DicomInstanceParameters instance(dicom); |
1495 | |
1500 } | 1496 } |
1501 } | 1497 } |
1502 }; | 1498 }; |
1503 | 1499 |
1504 | 1500 |