Hi Sergio, I was just working on that this morning. Here's what I do:
''' QList<mitk::DataNode::Pointer> nodes = this->GetDataManagerSelection(); mitk::DataNode* node = nodes.front(); mitk::BaseData* data = node->GetData(); std::string path = this->GetDataPath(data); /** Get Image path from mitk::BaseData. @param mitk::BaseData. @return String. */ std::string LJSView::GetDataPath( mitk::BaseData *data ) { return (data->GetProperty("path"))->GetValueAsString(); } ''' On 08/10/15 12:50, Sergio Vera wrote: > Thanks Daniel > > I was trying to interface with a command line tool. Guess best solution > is to write the the image back to disk before calling the executable. > > Regards > > On 8 October 2015 at 11:49, Daniel Maleike <d.male...@mint-medical.de > <mailto:d.male...@mint-medical.de>> wrote: > > On 08.10.2015 11:42, Sergio Vera wrote: >> Dear mitk-users >> >> I'm looking for the filename of an image loaded into MITKWorkbench. >> >> I want to know the path and filename of an image, but the datanode >> that is sent to my plugin knows only the path and name properties. >> >> Is there a way to discover the filename of the image with >> extension included? > > Hi Sergio, > > I think there is no way implemented yet. > > A challenge for having a simple "filename" property is that some > image formats have two or more files per image (header and raw data > or one file per slice). > > Kind regards, > Daniel > > -- > Dr. Daniel Maleike, Mint Medical GmbH > Friedrich-Ebert-Straße 2, 69221 Dossenheim/Heidelberg > Geschäftsführer: Dr. Matthias Baumhauer, Registergericht Mannheim, HRB > 709351 > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > mitk-users mailing list > mitk-users@lists.sourceforge.net > <mailto:mitk-users@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/mitk-users > > > > > -- > Sergio Vera > > Alma IT Systems > C/ Vilana, 4B, 4º 1ª > 08022 Barcelona > T. (+34) 932 380 592 > www.alma3d.com <http://www.alma3d.com> > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > mitk-users mailing list > mitk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mitk-users > -- Luis J. Salvatierra http://www.ljsalvatierra.com Python San Sebastián - ACPySS ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users