Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F292
Geometry3D.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
schwarzt
Oct 23 2009, 5:15 PM
2009-10-23 17:15:12 (UTC+2)
Size
1 KB
Referenced Files
None
Subscribers
None
Geometry3D.patch
View Options
Index: mitkGeometry3D.cpp
===================================================================
--- mitkGeometry3D.cpp (revision 19604)
+++ mitkGeometry3D.cpp (working copy)
@@ -142,7 +142,12 @@
void mitk::Geometry3D::IndexToWorld(const mitk::Point3D &pt_units, mitk::Point3D &pt_mm) const
{
- pt_mm = m_IndexToWorldTransform->TransformPoint(pt_units);
+ mitk::Point3D temp = pt_units;
+ if(m_ImageGeometry)
+ {
+ temp -= 0.5;
+ }
+ pt_mm = m_IndexToWorldTransform->TransformPoint(temp);
}
void mitk::Geometry3D::WorldToIndex(const mitk::Point3D &atPt3d_mm, const mitk::Vector3D &vec_mm, mitk::Vector3D &vec_units) const
@@ -351,6 +356,11 @@
++nans;
}
}
+
+ if(m_ImageGeometry)
+ {
+ out+=0.5;
+ }
if (nans > 0)
{
@@ -563,7 +573,7 @@
case 5: FillVector3D(cornerpoint, bounds[1],bounds[2],bounds[5]); break;
case 6: FillVector3D(cornerpoint, bounds[1],bounds[3],bounds[4]); break;
case 7: FillVector3D(cornerpoint, bounds[1],bounds[3],bounds[5]); break;
- default: assert(id < 8);
+ default: return NULL;
}
if(m_ImageGeometry)
{
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
281
Default Alt Text
Geometry3D.patch (1 KB)
Attached To
Mode
T2401: MPR displays pixel brightness mismatch
Attached
Detach File
Event Timeline
•
schwarzt
added a comment.
Oct 23 2009, 5:15 PM
2009-10-23 17:15:12 (UTC+2)
Comment Actions
Final_Patch
Log In to Comment