Skip to content

Commit

Permalink
fix: landmark is no longer placed between voxels
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Hewer committed May 22, 2018
1 parent c323bbc commit f62c727
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions landmark-tool/src/include/action/AddLandmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ class AddLandmark : public Action {

auto point = EventPosition::get_instance()->get();

// convert point to the center of the pixel containing it
point.set_x( (int) point.get_x() + 0.5);
point.set_y( (int) point.get_y() + 0.5);
point.set_z( (int) point.get_z() + 0.5);
// convert point to the voxel containing it
point.set_x( (int) point.get_x() );
point.set_y( (int) point.get_y() );
point.set_z( (int) point.get_z() );

// create landmark and add it to the landmark pool
auto mark = LandmarkPool::get_instance()->create_landmark(point);
Expand Down
8 changes: 4 additions & 4 deletions landmark-tool/src/include/action/MoveLandmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ class MoveLandmark: public Action {

auto point = EventPosition::get_instance()->get();

// convert point to the center of the pixel containing it
point.set_x( (int) point.get_x() + 0.5);
point.set_y( (int) point.get_y() + 0.5);
point.set_z( (int) point.get_z() + 0.5);
// convert point to voxel containing it
point.set_x( (int) point.get_x() );
point.set_y( (int) point.get_y() );
point.set_z( (int) point.get_z() );

auto mark = LandmarkPool::get_instance()->get_selected_landmark();

Expand Down

0 comments on commit f62c727

Please sign in to comment.