Answering my own question here:
Needed to add:
#include <mitkCoreExtObjectFactory.h>
...
RegisterCoreExtObjectFactory();
-Alan
On Wed, Jun 2, 2010 at 5:37 PM, Alan Antonuk <[email protected]> wrote:
> I'm having trouble getting an mitk::Contour object show up in a
> QmitkRenderWindow :
>
> Starting the step2 tutorial, after the image files get read in I've added
> this:
>
> mitk::Contour::Pointer contour = mitk::Contour::New();
> contour->Initialize();
> contour->SetClosed(true);
> contour->SetWidth(1.0f);
> float data[][3] =
> {
> {70.7, 93.1, 0},
> {79.23, 1.633, 0},
> {4.83, 5.767, 0},
> {21.9, 1.367, 0},
> };
> for (int i = 0; i < 4; ++i)
> {
> contour->AddVertex(mitk::Point3D(data[i]));
> }
>
> mitk::DataNode::Pointer contour_node = mitk::DataNode::New();
>
> contour_node->SetName("Contour");
> contour_node->SetData(contour);
> contour_node->AddProperty("color", mitk::ColorProperty::New(0.f, 1.f,
> 0.f));
> contour_node->AddProperty("visible", mitk::BoolProperty::New(true));
> contour_node->AddProperty("Width", mitk::FloatProperty::New(3.0f));
> contour_node->AddProperty("project", mitk::BoolProperty::New(true));
> contour_node->AddProperty("layer", mitk::IntProperty::New(0));
>
> storage->Add(contour_node);
>
> When I run the project nothing appears in the renderwindow. Any hints on
> what I maybe missing?
>
> I'm using MITK from SVN pulled late last week, ITK v3.16, and VTK v5.4.2
>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users