View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009310 | IGSTK | IGSTK | public | 2009-07-24 10:50 | 2009-07-24 10:53 | ||||
Reporter | Patrick Cheng | ||||||||
Assigned To | Patrick Cheng | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | All | OS | All | OS Version | All | ||||
Summary | 0009310: Ellipsoid object renderred in incorrect size | ||||||||
Description | Hi Jake, You are right. The problem is that the default "Size" of the m_EllipsoidSource is 0.5 We need to set it to be 1, if we consider the scale factors to be radius not diameter. The fix should be: m_EllipsoidSource->SetSize( 1.0 ); m_EllipsoidSource->SetScale( radius[0], radius[1], radius[2] ); Thank you for reporting this. Patrick Jake McIvor wrote: > I think I found it: > > In the UpdateRepresentationProcessing and SetEllipsoidObjectProcessing > methods, the scale of the vtkSuperquadricSource is updated: > > EllipsoidObjectType::ArrayType radius = m_EllipsoidObject->GetRadius(); > m_EllipsoidSource->SetScale( radius[0], radius[1], radius[2] ); > > The second line should read: > m_EllipsoidSource->SetScale( 2*radius[0], 2*radius[1], 2*radius[2] ); > > Does that make sense, or am I confusing the use of the setRadius method? > > -Jake | ||||||||
Steps To Reproduce | igstk::EllipsoidObject::Pointer sphere1 = igstk::EllipsoidObject::New(); sphere1->SetRadius( 10,10,10 ); igstk::EllipsoidObjectRepresentation::Pointer sphere1rep = igstk::EllipsoidObjectRepresentation::New(); sphere1rep->RequestSetEllipsoidObject( sphere1 ); sphere1rep->SetColor( 1.0,0.0,0.0 ); sphere1rep->SetOpacity( 0.9 ); igstk::EllipsoidObject::Pointer sphere2 = igstk::EllipsoidObject::New(); sphere2->SetRadius(10,10,10); igstk::EllipsoidObjectRepresentation::Pointer sphere2rep = igstk::EllipsoidObjectRepresentation::New(); sphere2rep->RequestSetEllipsoidObject( sphere2 ); sphere2rep->SetColor( 0.0,0.0,1.0 ); sphere2rep->SetOpacity( 0.9 ); igstk::Transform identity; identity.SetToIdentity(igstk::TimeStamp::GetLongestPossibleTime()); igstk::Transform transform; igstk::Transform::VectorType translation; igstk::Transform::VersorType rotation; translation[0] = 20.0; translation[1] = 0.0; translation[2] = 0.0; rotation.Set( 0.0, 0.0, 0.0, 1.0 ); igstk::Transform::ErrorType errorValue = 0; transform.SetTranslationAndRotation( translation, rotation, errorValue, igstk::TimeStamp::GetLongestPossibleTime() ); sphere1->RequestSetTransformAndParent( identity, m_View ); sphere2->RequestSetTransformAndParent( transform, m_View ); m_View->RequestAddObject( sphere1rep ); m_View->RequestAddObject( sphere2rep ); | ||||||||
Additional Information | IGSTK uses vtkSuperquadricSource to generate graphics primitive for visualization | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0016957) Patrick Cheng (developer) 2009-07-24 10:51 |
Verified. |
(0016958) Patrick Cheng (developer) 2009-07-24 10:52 |
Add this line to change the default "Size" of the vtkSuperquadricSource to 1. m_EllipsoidSource->SetSize( 1.0 ); So the scale factor will act like radius |
(0016959) Patrick Cheng (developer) 2009-07-24 10:53 |
Fixes checked in. Along with fixes with test programs and baseline images |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-07-24 10:50 | Patrick Cheng | New Issue | |
2009-07-24 10:50 | Patrick Cheng | Status | new => assigned |
2009-07-24 10:50 | Patrick Cheng | Assigned To | => Patrick Cheng |
2009-07-24 10:51 | Patrick Cheng | Note Added: 0016957 | |
2009-07-24 10:51 | Patrick Cheng | Status | assigned => confirmed |
2009-07-24 10:52 | Patrick Cheng | Note Added: 0016958 | |
2009-07-24 10:52 | Patrick Cheng | Status | confirmed => resolved |
2009-07-24 10:52 | Patrick Cheng | Resolution | open => fixed |
2009-07-24 10:53 | Patrick Cheng | Note Added: 0016959 | |
2009-07-24 10:53 | Patrick Cheng | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |