Reputation: 230
I am using GDCM to read in DICOM files. As the project is in C#, I have compiled GDCM's C# wrappings with SWIG, following GDCM's manual.
Now I am trying to sort all DICOMs in a folder into Volumes (much like the VolumeSorter example provided by GDCM, however, this is written in c++). I'm following the SortImage2.cs example, but this won't compile, giving me the error:
Error CS1503 Argument 1: cannot convert from 'method group' to 'SWIGTYPE_p_f_r_q_const__gdcm__DataSet_r_q_const__gdcm__DataSet__bool' New Unity Project.CSharp ...\Scripts\SortImage2.cs 33
Here's the full example:
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 Mathieu Malaterre
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
using System;
using gdcm;
public class SortImage2
{
bool mysort(DataSet ds1, DataSet ds2)
{
return false;
}
public static int Main(string[] args)
{
Sorter sorter = new Sorter();
sorter.SetSortFunction( mysort );
return 0;
}
}
I'm assuming it cannot interpret the Is there a way to "cast" the method to the expected type? Or is this an error in GDCM's setup of SWIG?
Upvotes: 0
Views: 240
Reputation: 12510
The example you are describing is actually commented out as seen here:
I suspect this is a functionality that has never been finished.
Upvotes: 0