Hi Alexander,
Thank you for the helpful idea.
(isn't this the right command- with argument two? :
Node->SetProperty("LookupTable",LookupTable*Prop*);)
Anyway, attached the code's snippet which still not visualizes the colored
surface on the 2d planes.
- any suggestions?
mitk::LookupTableProperty::Pointer myFilter::getLookUpTableProp()
{
mitk::LookupTable::Pointer mitk_lut = mitk::LookupTable::New();
mitk_lut->SetVtkLookupTable(m_vtk_lut);
mitk::LookupTableProperty::Pointer LookupTableProp =
mitk::LookupTableProperty::New();
LookupTableProp->SetLookupTable(mitk_lut);
return LookupTableProp;
}
mitk::LookupTableProperty::Pointer LookupTableProp =
mitk::LookupTableProperty::New();
LookupTableProp = myFilter->getLookUpTableProp();
mitk::DataNode::Pointer Node = mitk::DataNode::New();
Node->SetData( Surface );
Node->SetProperty("scalar visibility",
mitk::BoolProperty::New(true));
Node->SetProperty("color mode", mitk::BoolProperty::New(true));
Node->SetProperty("material.specularCoefficient",
mitk::FloatProperty::New(0.5));
* Node->SetProperty("LookupTable",LookupTableProp);*
Node->SetName(scalpNodeName.str());
Node->Update();
On Thu, Jan 12, 2012 at 4:29 PM, Alexander Seitel <
[email protected]> wrote:
> Hi Miri,
>
> you could also try to add a LookupTableProperty to your surface node you
> want to have colored. That will allow you to specify the range of colors
> your scalars will be visualized. That worked for my case also for the 2D
> planes. What you have to do is:
>
> - Create your specific lookup table mitk::LookupTable::Pointer lut
> - Set the lookup table as a property to your node:
> node->SetProperty("LookupTable",lut);
>
> Regards,
> Alex
>
> On Mon, 2012-01-09 at 21:22 +0100, Miri Trope wrote:
> > Hi Alfred,
> >
> > Thank you for your answer, you helped me with the saving process.
> >
> > However, a colored surface are well represented (with variety of
> > colors as has been set by the scalars) only on the 3d view, but not on
> > the 2d plans (on the 2d planes I'm only watching a blue surface,
> > without the variety of colors).
> >
> > It might be something which I've missed in my code ... a snap code of
> > the relevant parts is attached.
> >
> >
> > Regards,
> > Miri
> >
> >
> > On Mon, Jan 9, 2012 at 2:56 PM, Alfred Franz
> > <[email protected]> wrote:
> > Hi Miri,
> >
> > in MITK a Surface is shown in the planes views (Transversal,
> > Sagital and Coronal). You only have to take care that the
> > crosshair is at the right place. Colors are also shown in the
> > 2d views.
> >
> > The color property is an MITK object which the
> > vtkPolyDataWriter doesn't know. An easy way to save your
> > surface with colors is to use the MITK scene serialization,
> > which is also used if you click "File" => "Save Project". It
> > saves all data nodes from the data storage with the MITK
> > properties (like color, etc.). If you only want to save one
> > data node you can use the scene serialization by creating a
> > new data storage and only adding your data note.
> >
> > Greets,
> >
> > Alfred
> >
> > Am 07.01.2012 00:27, schrieb Miri Trope:
> >
> > > Hi All,
> > >
> > > My program calculates scalars on vtkPolyData. So, by the
> > > following methods a colored surface has been achieved:
> > >
> > >
> > > command in filter (in myModuleLib):
> > >
> > > surface->GetPointData()->SetScalars(vtkArray);
> > >
> > > commands in filterView (in plugIn directory):
> > >
> > > mitk::DataNode::Pointer surfaceNode =
> > > mitk::DataNode::New();
> > >
> > > surfaceNode->SetProperty("scalar visibility",
> > > mitk::BoolProperty::New(true));
> > >
> > > surfaceNode->SetProperty("color mode",
> > > mitk::BoolProperty::New(true));
> > >
> > >
> > > Now, I'm wondering how can I achieve the following
> > > abilities:
> > >
> > > 1. watch the colored surface either on the planes view (nor
> > > just on the 3d in the MITK's gui view)
> > >
> > > 2. write the colored surface (with the scalars) so it can be
> > > watched later with his colors.
> > > vtkPolyDataWriter can write the surface's scalars too?
> > >
> > >
> > >
> > > Regards,
> > > Miri
> > >
> >
> >
> >
> > --
> > Alfred Franz
> >
> > Deutsches Krebsforschungszentrum
> >
> > Abteilung Medizinische und Biologische Informatik
> >
> > Im Neuenheimer Feld 280
> >
> > 69120 Heidelberg
> >
> > Telefon: (+49) 6221/42-2330
> >
> > Fax: (+49) 6221/42-2345
> >
> > eMail: [email protected]
> >
> > http://mbi.dkfz-heidelberg.de
> >
> >
>
>
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users