profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/dzenanz/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Dženan Zukić dzenanz @KitwareMedical Carrboro, NC, USA https://www.kitware.com/dzenan-zukic/ Senior R&D Engineer @ Kitware

daviddoria/InteractiveImageGraphCutSegmentation 39

An ITK/VTK implementation of graph cuts based image segmentation

Besler/ITKBoneEnhancement 3

Various filters for enhancing cortical bones in quantitative computed tomography.

BlueQuartzSoftware/MultiscaleFusion 1

DREAM3D Plugin to hold Image Montaging and blending filters driven by ITK

dzenanz/grpc-windows 1

Build gRPC on Windows x64

dzenanz/ijRLEImage 1

Template of Technical Report to be submitted to the Insight Journal

dzenanz/2019-03-13-KRSCourseInBiomedicalImageAnalysisAndVisualization 0

Kitware Course in Biomedical Image Analysis and Visualization: ITK

dzenanz/ABC 0

ABC (Atlas Based Classification) is a comprehensive processing pipeline developed and used at University of North Carolina and University of Utah for brain MRIs

dzenanz/allen-ccf-itk-vtk-zarr 0

Visualization of the Allen Mouse Common Coordinate Framework brain atlas with itk.js, vtk.js, and zarr.

dzenanz/boringssl 0

Mirror of BoringSSL

pull request commentzlib-ng/zlib-ng

Add support for name mangling

you would have to ask all the authors of the libraries you want to use to support name mangling

Yes, and some do (HDF5 added it). For most libraries, we do the name mangling ourselves. For the original zlib, it is here. For zlib-ng, it is here. Extra burden from name mangling comes when adding new external symbols, which I do not image happens often. Or during build system refactoring, which happens once a decade? The biggest cost was devloping it, which has been already done now.

reason to use objcopy

If I am understanding this correctly, we would have to update the build system of all the bundled libraries. How is this easier/better than adding name mangling? And changing symbols only on object files/lib files would prevent our consumers from using any of the libraries we bundle. Right now, if someone wants to use libpng or zlib, they can use the version bundled with ITK.

dzenanz

comment created time in 10 minutes

Pull request review commentzlib-ng/zlib-ng

Add support for name mangling

+; zlib-ng data compression library+EXPORTS+; basic functions+    @ZLIB_SYMBOL_PREFIX@zlibng_version+    @ZLIB_SYMBOL_PREFIX@zng_deflate

That is completely arbitrary, and I did it because it was easier to copy-paste without having to pay attention which functions have zng_ prefix.

dzenanz

comment created time in an hour

PullRequestReviewEvent

pull request commentzlib-ng/zlib-ng

Add support for name mangling

The problem symbol mangling tries to solve is two different versions of zlib being bundled by two different dependencies. For example, both ITK and VTK bundle zlib. And if an application happens to require another library which bundles zlib (maybe libPNG?), the application author has only difficult choices:

  • drop one of the libraries, sacrificing functionality (e.g. compression)
  • copy part of library code to the application, causing maintenance hell
  • modify the library to exclude its bundled zlib
  • modify the library to allow it to point to another zlib to use instead of its own bundled version

The last two options are only possible if the library in question can work with the other version of zlib.

The solution to this is to rename symbols of the bundled zlib, in order to avoid the naming conflict. The option to modify the library to point to another zlib is still on the table, but is no longer a necessity.

As ITK's approach is to bundle some version of the dependencies, we have to mangle symbols of the common libraries (zlib, HDF5, jpeg, etc), or our users frequently run into a problem of duplicate symbols.

dzenanz

comment created time in an hour

pull request commentzlib-ng/zlib-ng

Add support for name mangling

change Z_PREFIX

I don't think this would do anything for third party code which doesn't use PREFIX() macro like the example does. Think libPNG and other similar libraries which depend on zlib.

dzenanz

comment created time in an hour

create barnchInsightSoftwareConsortium/ITK

branch : cxx14inExample

created branch time in 2 hours

pull request commentzlib-ng/zlib-ng

Add support for name mangling

Rebased and squashed.

dzenanz

comment created time in 2 hours

push eventdzenanz/zlib-ng

Nathan Moinvaziri

commit sha f77af71e77cdb9d41d5e3a606e2a8dd67034e387

Fixed trailing whitespaces and missing new lines.

view details

Ori Livneh

commit sha 0c7524acd3b83f5bdded9d1adf775cb228c32077

Fix UB in inffast.c when not using window When not using window, `window + wsize` applies a zero offset to a null pointer, which is undefined behavior.

view details

Nathan Moinvaziri

commit sha ce3cf80314a470f6a9780d2bf977ec28e342e970

Added CI instances for CTZLL and CTZ builtin existence to improve code coverage.

view details

Nathan Moinvaziri

commit sha 454bbf3e88fc3d5902ab298fc788258838dbe62d

Fill out gzheader before calling deflateSetHeader for better code coverage in example.

view details

Nathan Moinvaziri

commit sha 983df0adec3fb04bc47f051e479fb6490f5da3d9

Call deflateBound to calculate length with custom gzip header in example.

view details

Nathan Moinvaziri

commit sha 4deaf27124912152a51649160501e22e6ae7d621

Added code coverage for inflateGetDictionary in example.

view details

Nathan Moinvaziri

commit sha 92107a92d3cfb11cc464c24ef2a73c2d7d05d2ba

Use helper function for printing error and exiting in example.

view details

Dženan Zukić

commit sha 20714c4451b1500895639b31de5bb70c841ca4bb

Add support for name mangling This is useful when zlib-ng is embedded into another library, such as ITK: https://itk.org/ Closes #1025. Co-authored-by: Mika Lindqvist <postmaster@raasu.org>

view details

Dženan Zukić

commit sha 3b30803d1d2bb9a599111ef1700f973a66d37cf6

Exercise the new symbol prefix option in CI tests

view details

push time in 2 hours

PullRequestReviewEvent

pull request commentInsightSoftwareConsortium/ITK

Replace zlib by zlib-ng

Doesn't it give the option to stop the build in order to reload?

dzenanz

comment created time in 4 hours

delete branch dzenanz/miqa

delete branch : dropout

delete time in 4 hours

push eventOpenImaging/miqa

Dženan Zukić

commit sha 3947b1ca897391929176f59c546e0f23be3e8b76

Apply dropout regularization during training

view details

push time in 4 hours

PR merged OpenImaging/miqa

Apply dropout regularization during training
+1 -0

0 comment

1 changed file

dzenanz

pr closed time in 4 hours

Pull request review commentInsightSoftwareConsortium/ITK

ENH: Update libexpat files

 ITK.  The following command was used to obtain the symbol list: -nm libITKEXPAT-4.9.a | grep " [TRD] " |  awk '{ print $3 }' | sort | awk '{ print "#define "$1" itk_expat_"$1 }'+nm libITKEXPAT-5.3.a | grep " [TRD] " |  awk '{ print $3 }' | sort | awk '{ print "#define "$1" itk_expat_"$1 }'  */ -#define GetVTKEXpatXMLRole_RCSId itk_expat_GetVTKEXpatXMLRole_RCSId-#define XML_DefaultCurrent itk_expat_XML_DefaultCurrent-#define XML_ErrorString itk_expat_XML_ErrorString-#define XML_ExpatVersion itk_expat_XML_ExpatVersion-#define XML_ExpatVersionInfo itk_expat_XML_ExpatVersionInfo-#define XML_ExternalEntityParserCreate itk_expat_XML_ExternalEntityParserCreate-#define XML_GetBase itk_expat_XML_GetBase-#define XML_GetBuffer itk_expat_XML_GetBuffer-#define XML_GetCurrentByteCount itk_expat_XML_GetCurrentByteCount-#define XML_GetCurrentByteIndex itk_expat_XML_GetCurrentByteIndex-#define XML_GetCurrentColumnNumber itk_expat_XML_GetCurrentColumnNumber-#define XML_GetCurrentLineNumber itk_expat_XML_GetCurrentLineNumber-#define XML_GetErrorCode itk_expat_XML_GetErrorCode-#define XML_GetIdAttributeIndex itk_expat_XML_GetIdAttributeIndex-#define XML_GetInputContext itk_expat_XML_GetInputContext-#define XML_GetSpecifiedAttributeCount itk_expat_XML_GetSpecifiedAttributeCount-#define XmlGetUtf16InternalEncoding itk_expat_XmlGetUtf16InternalEncoding-#define XmlGetUtf16InternalEncodingNS itk_expat_XmlGetUtf16InternalEncodingNS-#define XmlGetUtf8InternalEncoding itk_expat_XmlGetUtf8InternalEncoding-#define XmlGetUtf8InternalEncodingNS itk_expat_XmlGetUtf8InternalEncodingNS-#define XmlInitEncoding itk_expat_XmlInitEncoding-#define XmlInitEncodingNS itk_expat_XmlInitEncodingNS-#define XmlInitUnknownEncoding itk_expat_XmlInitUnknownEncoding-#define XmlInitUnknownEncodingNS itk_expat_XmlInitUnknownEncodingNS-#define XML_Parse itk_expat_XML_Parse-#define XML_ParseBuffer itk_expat_XML_ParseBuffer-#define XML_ParserCreate itk_expat_XML_ParserCreate-#define XML_ParserCreate_MM itk_expat_XML_ParserCreate_MM-#define XML_ParserCreateNS itk_expat_XML_ParserCreateNS-#define XML_ParserFree itk_expat_XML_ParserFree-#define XmlParseXmlDecl itk_expat_XmlParseXmlDecl-#define XmlParseXmlDeclNS itk_expat_XmlParseXmlDeclNS-#define XmlPrologStateInit itk_expat_XmlPrologStateInit-#define XmlPrologStateInitExternalEntity itk_expat_XmlPrologStateInitExternalEntity-#define XML_SetAttlistDeclHandler itk_expat_XML_SetAttlistDeclHandler-#define XML_SetBase itk_expat_XML_SetBase-#define XML_SetCdataSectionHandler itk_expat_XML_SetCdataSectionHandler-#define XML_SetCharacterDataHandler itk_expat_XML_SetCharacterDataHandler-#define XML_SetCommentHandler itk_expat_XML_SetCommentHandler-#define XML_SetDefaultHandler itk_expat_XML_SetDefaultHandler-#define XML_SetDefaultHandlerExpand itk_expat_XML_SetDefaultHandlerExpand-#define XML_SetDoctypeDeclHandler itk_expat_XML_SetDoctypeDeclHandler-#define XML_SetElementDeclHandler itk_expat_XML_SetElementDeclHandler-#define XML_SetElementHandler itk_expat_XML_SetElementHandler-#define XML_SetEncoding itk_expat_XML_SetEncoding-#define XML_SetEndCdataSectionHandler itk_expat_XML_SetEndCdataSectionHandler-#define XML_SetEndDoctypeDeclHandler itk_expat_XML_SetEndDoctypeDeclHandler-#define XML_SetEndElementHandler itk_expat_XML_SetEndElementHandler-#define XML_SetEndNamespaceDeclHandler itk_expat_XML_SetEndNamespaceDeclHandler-#define XML_SetEntityDeclHandler itk_expat_XML_SetEntityDeclHandler-#define XML_SetExternalEntityRefHandler itk_expat_XML_SetExternalEntityRefHandler-#define XML_SetExternalEntityRefHandlerArg itk_expat_XML_SetExternalEntityRefHandlerArg-#define XML_SetNamespaceDeclHandler itk_expat_XML_SetNamespaceDeclHandler-#define XML_SetNotationDeclHandler itk_expat_XML_SetNotationDeclHandler-#define XML_SetNotStandaloneHandler itk_expat_XML_SetNotStandaloneHandler-#define XML_SetParamEntityParsing itk_expat_XML_SetParamEntityParsing-#define XML_SetProcessingInstructionHandler itk_expat_XML_SetProcessingInstructionHandler-#define XML_SetReturnNSTriplet itk_expat_XML_SetReturnNSTriplet-#define XML_SetStartCdataSectionHandler itk_expat_XML_SetStartCdataSectionHandler-#define XML_SetStartDoctypeDeclHandler itk_expat_XML_SetStartDoctypeDeclHandler-#define XML_SetStartElementHandler itk_expat_XML_SetStartElementHandler-#define XML_SetStartNamespaceDeclHandler itk_expat_XML_SetStartNamespaceDeclHandler-#define XML_SetUnknownEncodingHandler itk_expat_XML_SetUnknownEncodingHandler-#define XML_SetUnparsedEntityDeclHandler itk_expat_XML_SetUnparsedEntityDeclHandler-#define XML_SetUserData itk_expat_XML_SetUserData-#define XML_SetXmlDeclHandler itk_expat_XML_SetXmlDeclHandler-#define XmlSizeOfUnknownEncoding itk_expat_XmlSizeOfUnknownEncoding-#define XML_UseParserAsHandlerArg itk_expat_XML_UseParserAsHandlerArg-#define XmlUtf16Encode itk_expat_XmlUtf16Encode-#define XmlUtf8Encode itk_expat_XmlUtf8Encode+#define _XML_DefaultCurrent itk_expat__XML_DefaultCurrent

All symbols now having underscore prefix? That seems suspicious. See whether removing them fixes the Windows build failure. Example:

#define XML_DefaultCurrent itk_expat__XML_DefaultCurrent
agravgaard

comment created time in 4 hours

PullRequestReviewEvent

pull request commentInsightSoftwareConsortium/ITK

ENH: Update libexpat files

Could you break up this PR into more commits? Some preparatory commit(s), the main commit which copies new external code over the existing one, then some follow-up commit(s). That way we don't need to review the third-party code, only the changes in our code, or our changes to the third-party code. You can find recent examples: #2683 and #2708.

agravgaard

comment created time in 5 hours

pull request commentzlib-ng/zlib-ng

Add support for name mangling

CI CMake / Ubuntu 16.04 GCC (pull_request) Queued — Waiting to run this check...

Waiting since yesterday. This finally passes all the tests, including a few I added.

dzenanz

comment created time in 5 hours

push eventdzenanz/miqa

Dženan Zukić

commit sha 2112bbe7388fc5359811471a380b7773dc1287fc

Apply dropout regularization during training

view details

Dženan Zukić

commit sha 141c1e222bcda0b5c943ee9a24d450acfc969e1d

Retain more information in first convolutional block

view details

push time in a day

PR opened OpenImaging/miqa

Apply dropout regularization during training
+1 -0

0 comment

1 changed file

pr created time in a day

create barnchdzenanz/miqa

branch : dropout

created branch time in a day

PR opened SCIInstitute/Seg3D

Bump minimum required version of CMake to 2.8.12

This avoids the CMake Deprecation Warning. However, there are some bundled third party libraries in need of updating which have the same problem. CMake 2.8.12 was released in 2013.

+2 -4

0 comment

2 changed files

pr created time in a day

create barnchdzenanz/Seg3D

branch : bumpCMake

created branch time in a day

Pull request review commentSCIInstitute/Seg3D

Use GrowCut now available in ITK

 if(BUILD_MOSAIC_TOOLS)   ) endif() -SET(itk_GIT_TAG "v5.2.0")+SET(itk_GIT_TAG "1b16b76599a5eda9f8e9665d9a3f15a87634ce92")

I tried a build locally with v5.3rc01, and it compiled fine. Good to merge, I think.

dzenanz

comment created time in a day

PullRequestReviewEvent

push eventdzenanz/Seg3D

Dženan Zukić

commit sha c52f89a2f6406371b7db2474be1691ff6dd73f13

Use improved version of ITKGrowCut

view details

push time in a day

issue closedInsightSoftwareConsortium/ITKElastix

Transforming the Transform Parameters to a homogeneous transformation matrix

I would like a way of outputting the transformation parameters as a single transformation matrix. As an intermediate solution, a clear explanation on how to use the information given in the Transform Parameters to achieve the same result as the output of the registration.

Currently I am using the Center of Rotation (z, y, x) and the 6 Transform values (z_rot, y_rot, x_rot, z_trans, y_trans, x_trans) to create this matrix myself, but there are slight differences in the result of the image transformed with my matrix and the direct result of the registration. What is the order of the rotations? Is the description of the 6 Transform values even correct?


Edit:

After a week of trying and just 4 hours after typing this issue I finally figured out what elastix was doing:

CenterOfRotation (z, y, x) TransformValues (- z_rot, - y_rot, - x_rot, z_trans, y_trans, x_trans)

To get the Homogeneous Transformation Matrix you need to shift the volume to the center (0,0,0) using the CenterOfRotation.

CoR_mat = np.array([[1,0,0, -x ],
         [0,1,0, -y ],
         [0,0,1, -z ], 
         [0,0,0,1]])

(np being numpy) Then rotate the volume and shift it back to its original position. Remember that you need the value from the parameter file multiplied with -1.

x_rot = np.array([[1, 0, 0, 0],
                      [0, math.cos(x_rot), -math.sin(x_rot), 0],
                      [0, math.sin(x_rot), math.cos(x_rot), 0], 
                      [0, 0, 0, 1]])
    
y_rot = np.array([[math.cos(y_rot), 0, math.sin(y_rot), 0],
                      [0, 1, 0, 0],
                      [-math.sin(y_rot), 0, math.cos(y_rot), 0],
                      [0, 0, 0, 1]])
    
z_rot = np.array([[math.cos(z_rot), -math.sin(z_rot), 0, 0],
                      [math.sin(z_rot), math.cos(z_rot), 0, 0],
                      [0, 0, 1, 0],
                      [0, 0, 0, 1]])
    
rotation_mat =  z_rot @ y_rot @ x_rot

neg_CoR_mat = np.array([[1,0,0, x * scale],
                                 [0,1,0, y * scale],
                                 [0,0,1, z * scale], 
                                 [0,0,0,1]])

At last just apply the translation from the parameter file and multiply it all together:

translation_m = np.array([[1,0,0, x_trans],
                                 [0,1,0, y_trans],
                                 [0,0,1, z_trans], 
                                 [0,0,0,1]])

HMT = translation_m @ neg_CoR_mat  @ rotation_mat @ CoR_mat 

BUT!: This is a Pull transformation, things like scipy take this matrix to apply it to a volume, mathematically you would need to inverse it to apply it to a vector to get the transformed vector you wanted.

This gave me a headache...

closed time in a day

Yggdrasil1

issue commentInsightSoftwareConsortium/ITKElastix

Transforming the Transform Parameters to a homogeneous transformation matrix

ITK's transforms transform points from moving frame of reference (usually the moving image of the registration) to the fixed frame of reference. This is to ensure that moving image can be fully resampled, even if the transform is not invertible. However most humans (myself included) think of transforms as going from fixed image to the moving image.

There was recently a discussion about Elastix composing the transforms in opposite order from ITK, in case you run into that too.

Yggdrasil1

comment created time in a day

PullRequestReviewEvent

push eventOpenImaging/miqa

Matt McCormick

commit sha 5468e6efbf2855a4a44e05d0669ea615ad7f8120

Add nifti_to_zarr_ngff

view details

push time in a day