comparison Framework/Radiography/RadiographyLayerMaskTracker.cpp @ 488:aede9b042cb7 am-touch-events

now using ImageProcessing::FillPolygon
author am@osimis.io
date Tue, 19 Feb 2019 11:40:14 +0100
parents 2f6ecb5037ea
children 4f2416d519b4
comparison
equal deleted inserted replaced
487:e4febcef669e 488:aede9b042cb7
43 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 43 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
44 } 44 }
45 unsigned int ix, iy; // image coordinates 45 unsigned int ix, iy; // image coordinates
46 if (maskLayer->GetPixel(ix, iy, sourceSceneCp_.x, sourceSceneCp_.y)) 46 if (maskLayer->GetPixel(ix, iy, sourceSceneCp_.x, sourceSceneCp_.y))
47 { 47 {
48 maskLayer->SetCorner(MaskPoint(ix, iy), sourceSceneCp_.index); 48 maskLayer->SetCorner(Orthanc::ImageProcessing::ImagePoint((int32_t)ix, (int32_t)iy), sourceSceneCp_.index);
49 } 49 }
50 } 50 }
51 51
52 virtual void RedoInternal(RadiographyLayer& layer) const 52 virtual void RedoInternal(RadiographyLayer& layer) const
53 { 53 {
57 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 57 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
58 } 58 }
59 unsigned int ix, iy; // image coordinates 59 unsigned int ix, iy; // image coordinates
60 if (maskLayer->GetPixel(ix, iy, targetSceneCp_.x, targetSceneCp_.y)) 60 if (maskLayer->GetPixel(ix, iy, targetSceneCp_.x, targetSceneCp_.y))
61 { 61 {
62 maskLayer->SetCorner(MaskPoint(ix, iy), targetSceneCp_.index); 62 maskLayer->SetCorner(Orthanc::ImageProcessing::ImagePoint((int32_t)ix, (int32_t)iy), targetSceneCp_.index);
63 } 63 }
64 } 64 }
65 65
66 public: 66 public:
67 UndoRedoCommand(const RadiographyLayerMaskTracker& tracker) : 67 UndoRedoCommand(const RadiographyLayerMaskTracker& tracker) :
75 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 75 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
76 } 76 }
77 unsigned int ix, iy; // image coordinates 77 unsigned int ix, iy; // image coordinates
78 if (maskLayer->GetPixel(ix, iy, targetSceneCp_.x, targetSceneCp_.y)) 78 if (maskLayer->GetPixel(ix, iy, targetSceneCp_.x, targetSceneCp_.y))
79 { 79 {
80 maskLayer->SetCorner(MaskPoint(ix, iy), targetSceneCp_.index); 80 maskLayer->SetCorner(Orthanc::ImageProcessing::ImagePoint((int32_t)ix, (int32_t)iy), targetSceneCp_.index);
81 } 81 }
82 } 82 }
83 }; 83 };
84 84
85 85
131 RadiographyMaskLayer* maskLayer = dynamic_cast<RadiographyMaskLayer*>(&layer); 131 RadiographyMaskLayer* maskLayer = dynamic_cast<RadiographyMaskLayer*>(&layer);
132 if (maskLayer == NULL) 132 if (maskLayer == NULL)
133 { 133 {
134 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); 134 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
135 } 135 }
136 maskLayer->SetCorner(MaskPoint(ix, iy), startSceneCp_.index); 136 maskLayer->SetCorner(Orthanc::ImageProcessing::ImagePoint((int32_t)ix, (int32_t)iy), startSceneCp_.index);
137 } 137 }
138 } 138 }
139 } 139 }
140 } 140 }