Skip to content

Commit

Permalink
Merge pull request #14 from ahewer/master
Browse files Browse the repository at this point in the history
fix: landmark is no longer placed between voxels
  • Loading branch information
Alexander Hewer authored May 22, 2018
2 parents c323bbc + f62c727 commit 56aafdb
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 56aafdb

Please sign in to comment.