-::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
- itk::ThreadIdType threadId)
+#if ITK_VERSION_MAJOR >= 4
+::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
+#else
+::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId)
+#endif